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.
Published: 2026-05-16
Score: 8.8 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

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.

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

Remediation

No vendor fix or workaround currently provided.

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

No advisories yet.

History

Sat, 16 May 2026 07:15:00 +0000

Type Values Removed Values Added
Title Prototype Pollution via Unfiltered Delta or JSON Patch Input in jsondiffpatch

Sat, 16 May 2026 05:30:00 +0000

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'}


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: snyk

Published:

Updated: 2026-05-16T05:00:09.867Z

Reserved: 2026-05-15T06:27:57.484Z

Link: CVE-2026-8657

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-05-16T06:16:18.727

Modified: 2026-05-16T06:16:18.727

Link: CVE-2026-8657

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-05-16T07:00:11Z

Weaknesses