Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconIdentify endpoint accepting JSON delta/patch
-
DeliveryCraft delta with __proto__ or constructor.prototype keys
-
ExploitSubmit to vulnerable patch() API
-
Installjsondiffpatch traverses into Object.prototype
-
C2Global prototype gains attacker-controlled property
-
ExecuteDownstream code reads polluted property
-
ImpactAuthorization bypass, logic tampering, or RCE gadget triggered
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V3 - Web Frontend Security Prototype pollution prevention
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Initial Access The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | The vulnerable application must call jsondiffpatch.patch() or jsondiffpatch/formatters/jsonpatch.patch() on a delta or RFC 6902 JSON Patch document whose key names or path segments are attacker-controlled - typically a service that accepts diffs/patches from clients over HTTP, WebSocket, or another untrusted channel and applies them with jsondiffpatch < 0.7.6. No authentication, user interaction, or non-default library configuration is required (PR:N/UI:N) once the attacker can influence the delta. Exploitation is bounded by: (1) the application must actually feed untrusted input into these specific APIs - local-only diff computation is not exploitable; (2) the impact is prototype pollution of the Node/JS runtime hosting the call, so converting it to authorization bypass, DoS, or RCE requires a downstream gadget (vulnerable property lookup) inside the same process; and (3) Node processes started with --disable-proto=delete or with a frozen Object.prototype materially reduce or block the impact even on vulnerable versions. |
| Impact | Signals are mixed and the headline CVSS 4.0 score of 7.8 (AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:L, E:P) overstates the practical risk for most deployments. The vector treats this as remote/unauthenticated because jsondiffpatch is a library: 'remote' really means an attacker who can influence the delta or JSON Patch document fed to the API, which depends on how a downstream application uses it (e.g. accepting deltas over the wire vs. only computing them locally). E:P reflects that POC code is published (Snyk advisory plus a public gist), but the vulnerability is not listed on CISA KEV and EPSS data was not provided, so there is no evidence of opportunistic mass exploitation. Realistic impact is prototype pollution leading to logic tampering, denial of service, or - in chained scenarios - gadget-driven RCE in the host application; raw RCE in the library itself is not the primary outcome. Treat this as a high priority for any service that applies attacker-supplied jsondiffpatch deltas/JSON Patches, and as a lower priority where deltas come only from trusted sources. |
| Exploit ScenarioDerived | An application accepts JSON diffs from end users - for example a collaborative document editor or a config-sync API that calls jsondiffpatch.patch(currentState, userSuppliedDelta). The attacker submits a delta such as {"constructor":{"prototype":{"isAdmin":[true]}}} or {"__proto__":{"isAdmin":[true]}}; jsondiffpatch traverses into Object.prototype and sets isAdmin=true globally, after which any subsequent authorization check that reads obj.isAdmin against a plain object inherits the polluted value. A public POC is included in the Snyk advisory and at the linked GitHub gist. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv2 – May 16, 2026
Prototype pollution in the jsondiffpatch JavaScript library before 0.7.6 allows attackers to modify Object.prototype by supplying crafted delta documents to jsondiffpatch.patch() or JSON Patch documents to the jsonpatch formatter's patch() API. Because attacker-controlled key names and JSON Pointer path segments were used to traverse and mutate objects without filtering __proto__, constructor, or prototype, any application that feeds untrusted diffs into the library can have global object behavior tampered with. A public POC exists in the Snyk advisory and an accompanying gist, but there is no public exploit identified at time of analysis (not on CISA KEV).
Earlier versions of this analysis (1)
Prototype pollution in jsondiffpatch before 0.7.6 allows remote attackers to modify JavaScript Object.prototype through specially crafted JSON delta or patch documents. The vulnerability affects both jsondiffpatch.patch() and jsondiffpatch/formatters/jsonpatch.patch() APIs when processing untrusted input, enabling attackers to inject properties into all JavaScript objects. Public exploit code exists (EPSS E:P indicates proof-of-concept available) making this a practical attack vector for applications processing user-controlled JSON diffs.
RemediationAI
Upgrade the jsondiffpatch dependency to 0.7.6 or later (vendor-released patch: 0.7.6), which adds an UNSAFE_KEYS filter and an own-property guard in packages/jsondiffpatch/src/filters/nested.ts and rejects __proto__, constructor, and prototype segments in packages/jsondiffpatch/src/formatters/jsonpatch-apply.ts (see https://github.com/benjamine/jsondiffpatch/commit/381c0125efab49f6f0dbc08317d01d55717672af and https://security.snyk.io/vuln/SNYK-JS-JSONDIFFPATCH-16322990). If immediate upgrade is not possible, do not pass untrusted delta or JSON Patch documents into jsondiffpatch.patch() or jsondiffpatch/formatters/jsonpatch.patch(); pre-validate inputs by recursively rejecting any object key or JSON Pointer segment equal to __proto__, constructor, or prototype before applying, accepting that this validation must mirror the library's traversal exactly or risk bypass. As broader hardening, run Node with --disable-proto=delete (which removes the __proto__ accessor entirely and may break libraries that rely on it) or freeze Object.prototype at process startup with Object.freeze(Object.prototype) (which can break code that intentionally augments built-in prototypes); both are application-wide changes and should be tested before rollout.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in npm
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
jsondiffpatch is a widely used Node.js/browser library (npm package 'jsondiffpatch') for computing and applying JSON deltas, including an RFC 6902 JSON Patch formatter. The vulnerability is CWE-1321 (Improperly Controlled Modification of Object Prototype Attributes, 'Prototype Pollution'). Two code paths are at fault: packages/jsondiffpatch/src/filters/nested.ts, where the patch/reverse filters iterated delta keys and indexed into context.left[name] without rejecting __proto__ or restricting traversal to own properties (so a delta key chain like constructor.prototype walked through the inherited constructor into Object.prototype); and packages/jsondiffpatch/src/formatters/jsonpatch-apply.ts, where parsePathFromRFC6902 split a JSON Pointer string into segments that were used unchecked as property accessors. The fix introduces an UNSAFE_KEYS set ({__proto__, constructor, prototype} for JSON Patch paths, {__proto__} for delta filters combined with hasOwnProperty guards on left) so unsafe segments are skipped or rejected. The single affected CPE is cpe:2.3:a:n/a:jsondiffpatch:*:*:*:*:*:*:*:* covering versions 0 < 0.7.6.
Know when Jsondiffpatch gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:L/SC:N/SI:N/SA:N/E:P
Primary rating from Vendor (snyk) · only source for this CVE.
CVSS VectorVendor: snyk
Lifecycle Timeline
3DescriptionCVE.org
Versions of the package jsondiffpatch before 0.7.6 are vulnerable to Prototype Pollution via the jsondiffpatch.patch() and jsondiffpatch/formatters/jsonpatch.patch() APIs. An attacker can perform prototype pollution by supplying crafted delta or JSON Patch documents, as attacker-controlled property names and path segments are used to traverse and modify objects without restricting access to special properties like __proto__ or constructor.prototype, allowing modification of Object.prototype.
Blast Radius
ecosystem impact- 22 npm packages depend on jsondiffpatch (7 direct, 15 indirect)
Ecosystem-wide dependent count for version 0.7.6.
Executive ViewAI
jsondiffpatch, a widely-used JavaScript library for JSON document diffing, contains a prototype pollution vulnerability that allows attackers to corrupt global JavaScript object behavior in applications that process untrusted JSON diffs. Applications using versions before 0.7.6 risk arbitrary code execution and unauthorized object property manipulation affecting application logic across all dependent code.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
EUVD-2026-30670
GHSA-j4fx-xxwh-2485
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB