{"id":"CVE-2021-23436","aliases":["CVE-2021-23436","GHSA-33f9-j839-rf8h"],"related":[],"kind":"vulnerability","state":"published","title":"Prototype Pollution","summary":"This affects the package immer before 9.0.6. A type confusion vulnerability can lead to a bypass of CVE-2020-28477 when the user-provided keys used in the path parameter are arrays. In particular, this bypass is possible because the condition (p === \"__proto__\" || p === \"constructor\") in applyPatches_ returns false if p is ['__proto__'] (or ['constructor']). The === operator (strict equality operator) returns false if the operands have different type.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"This affects the package immer before 9.0.6. A type confusion vulnerability can lead to a bypass of CVE-2020-28477 when the user-provided keys used in the path parameter are arrays. In particular, this bypass is possible because the condition (p === \"__proto__\" || p === \"constructor\") in applyPatches_ returns false if p is ['__proto__'] (or ['constructor']). The === operator (strict equality operator) returns false if the operands have different type.","source":"cvelist"},{"lang":"en","text":"This affects the package immer before 9.0.6. A type confusion vulnerability can lead to a bypass of CVE-2020-28477 when the user-provided keys used in the path parameter are arrays. In particular, this bypass is possible because the condition `(p === \"__proto__\" || p === \"constructor\")` in `applyPatches_` returns false if `p` is `['__proto__']` (or `['constructor']`). The `===` operator (strict equality operator) returns false if the operands have different type.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Esto afecta al paquete immer versiones anteriores a 9.0.6. Una vulnerabilidad de confusión de tipo puede conllevar a una omisión  de CVE-2020-28477 cuando las claves proporcionadas por el usuario usadas en el parámetro de la ruta son matrices. En particular, esta omisión es posible porque la condición (p === \"__proto__\" || p === \"constructor\") en applyPatches_ devuelve false si p es [\"__proto__\"] (o [\"constructor\"]). El operador === (operador de igualdad estricta) devuelve false si los operandos tienen distinto tipo","source":"nvd"}],"published":"2021-09-01T17:30:09.902Z","modified":"2026-06-17T03:38:45.597Z","severity":{"scorer":"snyk","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L/E:P/RL:O/RC:C","score":5.6,"rating":"MEDIUM"},"severities":[{"scorer":"snyk","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L/E:P/RL:O/RC:C","score":5.6,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:N/C:P/I:P/A:P","score":7.5,"rating":"HIGH"}],"cwes":["CWE-843","CWE-1321"],"affected":[{"ranges":[{"type":"custom","introduced":"unspecified","fixed":"9.0.6","status":"affected"}],"product":"immer","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"7.0.0","status":"affected","fixed":"9.0.6"}],"ecosystem":"npm","package":"immer","purl":"pkg:npm/immer","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"9.0.6"}],"vendor":"immer_project","product":"immer","cpe":"cpe:2.3:a:immer_project:immer:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://snyk.io/vuln/SNYK-JS-IMMER-1540542","tags":["exploit","patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-1579266","tags":["exploit","patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/immerjs/immer/commit/fa671e55ee9bd42ae08cc239102b665a23958237","tags":["patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-23436","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/immerjs/immer","tags":["package"],"sources":["ghsa"]}],"credits":["Alessio Della Libera of Snyk Research Team"],"assigner":"snyk","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-23436","url":"https://www.cve.org/CVERecord?id=CVE-2021-23436","licence":"CVE Terms of Use","modified":"2024-09-16T16:28:32.515Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-33f9-j839-rf8h","url":"https://github.com/advisories/GHSA-33f9-j839-rf8h","licence":"CC-BY-4.0","modified":"2025-01-14T09:12:14.521Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-23436","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-23436","licence":"Public domain","modified":"2026-06-17T03:38:45.597Z"}],"updatedAt":"2026-11-25T22:58:03.615Z","epss":{"score":0.01795,"percentile":0.79065,"date":"2026-12-01T12:00:22.000Z"}}