CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-26021

The Ouroboros Bug: How set-in's Security Check Ate Itself

Amit Schendel
Amit Schendel
Senior Security Researcher

Feb 12, 2026·6 min read·49 visits

Executive Summary (TL;DR)

The `set-in` library used a mutable global method (`.includes()`) to validate input against prototype pollution. Attackers can hijack this method to bypass the check, allowing full prototype pollution.

A critical prototype pollution vulnerability in the `set-in` npm package exposes a fundamental misunderstanding of JavaScript's mutable environment. The library attempted to blacklist dangerous keys like `__proto__` and `constructor` to prevent pollution, but it implemented this check using `Array.prototype.includes`. In a hostile environment—or via a prior gadget—an attacker can monkey-patch this method to always return `false`, effectively turning off the security camera before robbing the bank. This allows arbitrary property injection into the global `Object.prototype`, leading to Denial of Service (DoS) or Remote Code Execution (RCE).

The Hook: A False Sense of Security

We all love helper libraries. Why write ten lines of defensive code to safely set a nested property when you can just npm install set-in and do it in one? It’s the classic developer trade-off: convenience for dependency hell. The set-in package does exactly what it says on the tin: it takes an object, a path (like ['users', 'admin', 'permissions']), and a value, and it sets it deep inside the structure. It creates the intermediate objects if they don't exist. It's elegant, simple, and prior to version 2.0.5, fundamentally broken.

The maintainers weren't negligent; they were trying to be secure. They knew about the horrors of Prototype Pollution—the vulnerability class where an attacker modifies the base Object.prototype, causing every object in the application to inherit malicious properties. They even had a blacklist. They had a specific array of forbidden keys: __proto__, constructor, and prototype.

But here's the punchline: they trusted the JavaScript runtime environment to be honest. In the world of exploit development, trusting the environment is like trusting a starving lion to hold your steak. The vulnerability isn't just that they missed a key; it's that the mechanism they used to check the keys was itself susceptible to modification. It’s a meta-vulnerability.

The Flaw: Trusting Mutable Globals

The root cause of CVE-2026-26021 is a lesson in JavaScript's terrifying flexibility. The library defines a constant array of forbidden keys: const POLLUTED_KEYS = ['__proto__', 'constructor', 'prototype']. When the setIn function iterates through the user-provided path, it checks if the current key is in that list. So far, so good, right?

Wrong. The implementation looked like this:

assert.ok(!POLLUTED_KEYS.includes(key), ...)

See the problem? It relies on Array.prototype.includes. In JavaScript, almost everything is mutable, including the definitions of core language methods. If an attacker—or a malicious third-party script, or a previous clumsy exploit—can modify Array.prototype.includes, they control the outcome of this security check.

Imagine a bank vault that checks your ID card. But instead of looking at the card, the guard calls a phone number on the wall labeled "Verify ID". If you can change that phone number to route to your accomplice, the guard will let you in every time. Here, the includes method is that phone number. By redefining it to always return false, the library happily accepts __proto__ as a valid key, believing it's safe because the hijacked check said so.

The Code: The Smoking Gun

Let's dissect the code changes in commit b8e1dabfdbd35c8d604b6324e01d03f280256c3d. The difference is subtle but changes the logic from "user-land trust" to "language-spec enforcement".

The Vulnerable Code:

// Relying on a method that exists on the Array prototype
var key = path[index];
assert.ok(!POLLUTED_KEYS.includes(key), `setIn: ${key} is disallowed...`);

This is vulnerable because POLLUTED_KEYS inherits from Array.prototype. If I do Array.prototype.includes = () => false, the assertion passes regardless of what key is.

The Fixed Code:

// Relying on primitive equality operators
if(key == "constructor" || key == "prototype" || key == "__proto__"){
  throw `setIn: ${key} is disallowed...`
}

The fix abandons the elegant array lookup for ugly, hard-coded logic using the == operator. Why is this better? Because you cannot monkey-patch the == operator. It is a fundamental syntactic construct of the language, not a property of an object. The attacker can poison every prototype in the heap, but they cannot change the fact that "__proto__" == "__proto__" evaluates to true.

The Exploit: Hijacking the Guard

To exploit this, we don't just throw data at the library; we have to prepare the battlefield. This is a two-stage attack. First, we compromise the environment. Second, we trigger the vulnerability.

Step 1: The Monkey Patch We need to override the includes method. In a real-world scenario, this might happen via a separate, lower-severity vulnerability that allows executing simple assignments, or via a "gadget" chain where we can define properties on prototypes.

// The heist setup: blind the security guard
const originalIncludes = Array.prototype.includes;
Array.prototype.includes = function() {
  return false; // "Everything is fine, officer."
};

Step 2: The Injection Now we call set-in. The library asks, "Is __proto__ in the blacklist?" Our hijacked method replies, "No."

const setIn = require('set-in');
const target = {};
 
// The payload
setIn(target, ['__proto__', 'polluted'], 'PWNED');
 
// The proof
console.log({}.polluted); // Outputs: 'PWNED'

Once Object.prototype is polluted, every object created subsequently will have the polluted property set to 'PWNED'. This persists until the process restarts. If you change polluted to toString or toJSON, you can crash the application or alter API responses globally.

The Impact: From Pollution to RCE

Why should you care if I can set a property on an object? Because JavaScript developers rely on "undefined" being truly undefined.

Remote Code Execution (RCE): Many server-side template engines (like Handlebars or EJS) or process-spawning libraries (like child_process) inspect option objects. If they check for a property like shell or eval and find it missing, they use a safe default. Prototype pollution allows us to define those properties globally. Suddenly, a child_process.exec call that was supposed to run ls is running /bin/sh because we polluted the options object.

Denial of Service (DoS): If we pollute __proto__.toString with a string instead of a function, any code attempting to cast an object to a string will throw a TypeError and crash the Node.js process. It's a kill switch for the entire server.

Authentication Bypass: Imagine code like if (user.isAdmin) { grantAccess() }. If user.isAdmin is undefined, access is denied. But if we pollute Object.prototype.isAdmin = true, then every user is an admin. The logic inversion is trivial and devastating.

The Mitigation: Hardening the Stack

The immediate fix is to upgrade set-in to version 2.0.5. This version removes the reliance on mutable methods for its security checks. But the broader lesson here is about defensive coding.

1. Freeze Your Prototypes: If you are running a Node.js service, you should consider freezing the built-in prototypes at application startup. This prevents dependencies from monkey-patching globals, intentionally or accidentally.

// Make the environment immutable
Object.freeze(Object.prototype);
Object.freeze(Array.prototype);

2. Map over Object: When storing key-value pairs where keys are user-controlled, use the Map structure instead of plain Objects. Map does not inherit from Object.prototype and is immune to these key-collision attacks.

3. Input Validation: Never assume a library handles validation perfectly. Use a schema validator like Joi or Zod to ensure that input paths do not contain restricted keywords before they even reach utility functions like set-in.

Official Patches

npmNPM Registry Page for fixed version
GitHubCommit fixing the vulnerability

Fix Analysis (1)

Technical Appendix

CVSS Score
9.4/ 10
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H

Affected Systems

Node.js applications using set-in < 2.0.5Frontend applications (React/Vue/Angular) using set-in for state management

Affected Versions Detail

Product
Affected Versions
Fixed Version
set-in
ahdinosaur
>= 2.0.1, < 2.0.52.0.5
AttributeDetail
CWE IDCWE-1321
Attack VectorLocal (via library usage)
CVSS Score9.4 (Critical)
Affected Versions< 2.0.5
Exploit StatusPoC Available
PatchCommit b8e1dab

MITRE ATT&CK Mapping

T1203Exploitation for Client Execution
Execution
T1211Exploitation for Defense Evasion
Defense Evasion
CWE-1321
Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')

Known Exploits & Detection

Internal ResearchPoC demonstrating Array.prototype.includes hijack to bypass security check

Vulnerability Timeline

Fix commit b8e1dab authored
2026-02-11
CVE-2026-26021 Published
2026-02-11
GHSA-2c4m-g7rx-63q7 Issued
2026-02-11

References & Sources

  • [1]GitHub Advisory
  • [2]CWE-1321 Explanation

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•36 minutes ago•CVE-2026-63402
5.9

CVE-2026-63402: Prototype-Chain Traversal and Shared Built-in Corruption in i18next

CVE-2026-63402 is a prototype-chain traversal and shared built-in object corruption vulnerability in the i18next internationalization framework for JavaScript prior to version 26.3.4. The flaw resides in the deepExtend utility function within src/utils.js, which uses the JavaScript 'in' operator to verify property existence on target objects. When an application passes untrusted resource bundles to i18next.addResourceBundle() with both the deep and overwrite parameters set to true, an attacker can traverse into inherited methods on Object.prototype and overwrite properties on shared built-in function objects, causing process-wide denial of service.

Amit Schendel
Amit Schendel
1 views•10 min read
•about 2 hours ago•CVE-2026-58262
7.1

CVE-2026-58262: BLS Signature Quorum Bypass via PubKeysBitmap Padding Bits in Klever-Go

CVE-2026-58262 (tracked internally as KLR-04 and via GitHub Security Advisory GHSA-f9h7-4mmq-vgcq) is a cryptographic verification and consensus quorum bypass vulnerability in Klever-Go (`klever-io/klever-go`), the Go implementation of the Klever blockchain protocol. Prior to version 1.7.20, the block header signature verification logic (`HeaderSigVerifier.verifyConsensusSize`) counts all set bits across the entire `PubKeysBitmap` byte slice toward the required two-thirds validator quorum without masking or validating unused trailing padding bits in the final byte. Because the underlying Boneh-Lynn-Shacham (BLS) multi-signature verification function (`blsMultiSigner.Verify`) iterates strictly over the indices of configured validator public keys, it ignores any bits set at indices beyond the active consensus group size. When the consensus group size is not an exact multiple of 8, a compromised or malicious block producer can set these unused trailing padding bits to artificially inflate the apparent signer count by up to 7 signatures, enabling blocks with fewer genuine validator signatures than required by the protocol to pass consensus validation.

Alon Barad
Alon Barad
2 views•14 min read
•about 3 hours ago•CVE-2026-77423
7.5

CVE-2026-77423: Regular Expression Denial of Service (ReDoS) in JLine Built-in Less Viewer

CVE-2026-77423 is a Regular Expression Denial of Service (ReDoS) vulnerability in the built-in less viewer of the JLine Java library (versions 3.0.0 prior to 3.30.15, and 4.0.0 prior to 4.3.1). The org.jline.builtins.Less class passes user-supplied search and display-filter patterns directly to Java's standard backtracking regular expression engine without complexity validation or execution timeouts. An attacker with access to an interactive JLine session can submit patterns containing nested quantifiers, causing catastrophic backtracking that consumes 100% of a CPU core and blocks the session thread indefinitely. In network-facing deployments such as SSH or Telnet administration consoles, repeated exploitation across concurrent sessions can exhaust bounded worker thread pools and result in a complete denial of service.

Alon Barad
Alon Barad
3 views•10 min read
•about 4 hours ago•CVE-2026-63492
8.1

CVE-2026-63492 (Duplicate of CVE-2026-63304): OS Command Injection in WWBN AVideo Standalone API

CVE-2026-63492 is a rejected CVE identifier originally assigned by GitHub for an OS command injection vulnerability in WWBN AVideo (formerly YouPHPTube) up to version 29.0. It was rejected as a duplicate of the canonical identifier CVE-2026-63304 (tracked under GHSA-j44m-77cc-p3cc). The flaw resides in the listFFmpegProcesses() function within plugin/API/standAlone/functions.php, which interpolates unsanitized user parameters directly into a single-quoted shell pipeline executed via PHP's exec() function. Attackers capable of crafting a valid AES-256-CBC encrypted API payload can break out of the single-quoted context and execute arbitrary operating system commands as the web-server user.

Amit Schendel
Amit Schendel
3 views•9 min read
•about 5 hours ago•CVE-2026-63476
4.3

CVE-2026-63476: Unbounded Memory Allocation and Denial of Service in isomorphic-git Packfile Delta Parser

CVE-2026-63476 is an uncontrolled resource consumption vulnerability in isomorphic-git prior to version 1.38.6. When parsing Git packfile delta objects during clone or fetch operations, the applyDelta utility reads an untrusted targetSize integer from the delta stream header and passes it directly to Buffer.alloc(). A malicious remote Git server or man-in-the-middle attacker can supply a delta header specifying a targetSize of approximately 2 GB with minimal actual payload data. Because Buffer.alloc() reserves off-heap memory in Node.js, this bypasses standard V8 heap limits and results in immediate out-of-memory termination or sustained memory retention.

Amit Schendel
Amit Schendel
4 views•10 min read
•about 6 hours ago•CVE-2026-63410
5.9

CVE-2026-63410: Compiler-Induced Timing Side-Channel in secp256k1-native Scalar Multiplication

CVE-2026-63410 (GHSA-vp2j-gqfm-r3cf) is a compiler-induced timing side-channel vulnerability in the secp256k1-native Ruby C extension. When compiled with GCC 14.x or 15.x at optimization level -O2, the compiler reconstructs boolean predicates from branchless bitwise multiplexer routines and emits secret-dependent conditional jump instructions (je/jne). During elliptic curve scalar multiplication in the Montgomery ladder, these conditional branches create observable execution timing variations correlated with individual bits of secret private keys or signing nonces.

Alon Barad
Alon Barad
2 views•12 min read