VDB
Sign up
HIGH8.2

GHSA-j4fx-xxwh-2485

jsondiffpatch patch APIs are vulnerable to prototype pollution

Quick fix

GHSA-j4fx-xxwh-2485 — jsondiffpatch: upgrade to the fixed version with the command below.

npm install jsondiffpatch@0.7.6

Details

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.

Are you affected?

Enter the version of the package you're using.

Affected packages

npm/jsondiffpatch
Introduced in: 0Fixed in: 0.7.6
Fixnpm install jsondiffpatch@0.7.6

References