Skip to content
Threat Feed
medium advisory

Prototype Pollution Vulnerability in Node.js JSON Merge Patch Implementations

A prototype pollution vulnerability, tracked as CVE-2026-3030, allows attackers to inject malicious properties into the global Object.prototype via insecure deep merge functions, potentially leading to privilege escalation.

CVE-2026-3030 identifies a prototype pollution vulnerability affecting Node.js applications that implement insecure deep merge functions for handling JSON Merge Patch objects. The vulnerability exists when a recursive merge function fails to sanitize input keys, allowing an attacker to pass the __proto__ key in a JSON request body. By leveraging this, an attacker can modify the prototype of the global Object, injecting or overwriting properties that are subsequently used by the application logic for security checks or control flow. The impact of such pollution can range from unauthorized privilege escalation - such as forcing an application to grant admin rights - to application crashes or, in specific contexts, potential remote code execution. Defenders should review Node.js application code, specifically any custom deep merge utilities that process untrusted user input, to ensure property filtering is implemented.

Impact

The vulnerability facilitates privilege escalation and unauthorized access within web applications by manipulating application state through prototype contamination. If successfully exploited, an attacker could bypass authentication mechanisms (e.g., setting isAdmin to true in a session object), gain unauthorized administrative access, or trigger denial-of-service conditions.

Recommendation

  • Audit codebase for custom deepMerge implementations in Node.js applications and implement robust input sanitization to block keys named __proto__, constructor, or prototype.
  • Ensure that all JSON parsing and merging logic in web APIs explicitly validates incoming keys against a blocklist of sensitive prototype identifiers.
  • Utilize security scanning tools capable of identifying prototype pollution patterns in custom application logic.
  • Monitor web application logs for suspicious PATCH requests containing __proto__ keys in the request body.

Immediate actions

Deploy the provided Sigma rule to monitor for prototype pollution attempts.

Detection Engineering 24h

Threat Hunt

Search for PATCH requests to API endpoints that contain __proto__ or constructor in the request body.

T1190 high medium confidence hunt now

Data: Web server access logs

Mitigations

Review Node.js code for any deepMerge functions and implement input sanitization to block prototype-related keys.

immediate Application Security

CVE-2026-3030

Detection coverage 1

Detect Prototype Pollution Attempt via JSON Patch

medium

Detects incoming HTTP PATCH requests containing __proto__ in the JSON body, which may indicate an attempt to exploit CVE-2026-3030.

sigma tactics: privilege-escalation techniques: T1190 sources: webserver

Detection queries are available on the platform. Get full rules →