CVE-2026-8657

Prototype Pollution via Unfiltered Delta or JSON Patch Input in jsondiffpatch

Published May 16, 2026 CVSS 4.0 · 8.8 High EPSS < 1% KEV · Not listed
Description
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.

Analysis

AI-generated

Technical impact

The vulnerability exists in the JavaScript library jsondiffpatch and is caused by the patch functions that accept unfiltered delta or JSON Patch inputs. Because the library blindly uses property names and path segments from these inputs, an attacker can supply crafted data that targets the special properties __proto__ or constructor.prototype. This causes those properties to be set on Object.prototype, allowing the attacker to pollute the global prototype chain. Based on the description, it is inferred that the attacker can cause downstream objects to inherit these polluted properties, potentially leading to code execution or other malicious behavior depending on how application code uses those objects. The weakness is classified as CWE‑1321.

Affected Systems

These weaknesses are present in all jsondiffpatch releases prior to 0.7.6. Projects that depend on the library via npm or yarn and use either the default patch API or the jsonpatch formatter API are susceptible. The vulnerability is vendor‑agnostic but applies to any application or service that imports jsondiffpatch from npm and forwards external or untrusted data to its patch functions.

Risk and Exploitability

The CVSS score of 8.8 indicates a high severity. The EPSS score is not available, but the lack of a documented exploit in the KEV catalog suggests limited public exploitation at present. However, because the flaw is triggered by arbitrary input to a widely used library, the risk surface is high, especially in environments where the library is used with externally provided patch data. Based on the description, it is inferred that attackers can likely achieve prototype pollution locally, which may lead to code execution if the polluted prototype is later used to evaluate or execute code. The vulnerability is known to exist but no official patch or workaround is available from a CNA, so the sole mitigation is to update the package.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade jsondiffpatch to 0.7.6 or newer.
  • If an upgrade is not immediately possible, configure the library to reject or sanitize property names that begin with "__proto__" or "constructor".
  • Avoid using external patch data with jsondiffpatch until the library is patched or additional runtime checks are applied to prevent prototype pollution.

Generated by OpenCVE AI on May 16, 2026 at 06:50 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-j4fx-xxwh-2485 jsondiffpatch patch APIs are vulnerable to prototype pollution
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Benjamine
Benjamine jsondiffpatch
Vendors & Products Benjamine
Benjamine jsondiffpatch
Type Values Removed Values Added
Title Prototype Pollution via Unfiltered Delta or JSON Patch Input in jsondiffpatch
Type Values Removed Values Added
Description 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.
Weaknesses CWE-1321
References
Metrics cvssV3_1

{'score': 8.2, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L/E:P'}

cvssV4_0

{'score': 8.8, 'vector': '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'}

Weaknesses
  • CWE-1321

    Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')

Sources

Status
PUBLISHED
Assigner
snyk
Published
Updated
Aug 23, 2026, 3:25 PM
Reserved
May 15, 2026, 6:27 AM
Status
Deferred
Published
May 16, 2026, 6:16 AM
Modified
Jul 5, 2026, 4:19 PM