Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. jsondiffpatch
  4. ›
  5. CVE-2026-8657

CVE-2026-8657: jsondiffpatch patch APIs are vulnerable to prototype pollution

May 16, 2026 (updated August 31, 2026)

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.

References

  • gist.github.com/yuki-matsuhashi/e570fb1579ae1f3190059b622b0473fb
  • github.com/advisories/GHSA-j4fx-xxwh-2485
  • github.com/benjamine/jsondiffpatch/blob/96112c35a98f9201dd75d67fcee68a952c79e2fe/packages/jsondiffpatch/src/filters/nested.ts%23L107-L115
  • github.com/benjamine/jsondiffpatch/blob/96112c35a98f9201dd75d67fcee68a952c79e2fe/packages/jsondiffpatch/src/filters/nested.ts%23L82-L87
  • github.com/benjamine/jsondiffpatch/blob/96112c35a98f9201dd75d67fcee68a952c79e2fe/packages/jsondiffpatch/src/formatters/jsonpatch-apply.ts%23L146-L168
  • github.com/benjamine/jsondiffpatch/blob/96112c35a98f9201dd75d67fcee68a952c79e2fe/packages/jsondiffpatch/src/formatters/jsonpatch-apply.ts%23L171-L199
  • github.com/benjamine/jsondiffpatch/commit/381c0125efab49f6f0dbc08317d01d55717672af
  • nvd.nist.gov/vuln/detail/CVE-2026-8657
  • security.snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-16732792
  • security.snyk.io/vuln/SNYK-JS-JSONDIFFPATCH-16322990

Code Behaviors & Features

Detect and mitigate CVE-2026-8657 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 0.7.6

Fixed versions

  • 0.7.6

Solution

Upgrade to version 0.7.6 or above.

Impact 8.2 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L

Learn more about CVSS

Weakness

  • CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')

Source file

npm/jsondiffpatch/CVE-2026-8657.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Tue, 01 Sep 2026 00:19:54 +0000.