Security advisory
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.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2021-23436
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 31 Oct 2026, 11:40 UTC · Revision 1
Source evidence
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.
osv:CVE-2021-23436
Complete source record
{
"id": "def1041f23f2f09aeae943a3bc1aaa2904cdb7c61b60d1fb099b56570502d218",
"url": "https://osv.dev/vulnerability/CVE-2021-23436",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "CVE-2021-23436",
"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.",
"evidence": "osv:CVE-2021-23436",
"products": [],
"severity": "critical",
"structured": {
"id": "CVE-2021-23436",
"aliases": [
"CVE-2021-23436",
"GHSA-33f9-j839-rf8h"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/immerjs/immer",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "fa671e55ee9bd42ae08cc239102b665a23958237"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:immer_project:immer:*:*:*:*:*:node.js:*:*",
"range": [
{
"introduced": "0"
},
{
"fixed": "9.0.6"
}
],
"source": "CPE_RANGE"
},
{
"range": [
{
"fixed": "fa671e55ee9bd42ae08cc239102b665a23958237"
}
],
"source": "REFERENCES_COMMIT"
}
]
}
}
],
"versions": [
"v9.0.5",
"v9.0.4",
"v9.0.3",
"v9.0.2",
"v9.0.1",
"v9.0.0",
"v8.0.4",
"v8.0.3",
"v8.0.2",
"v8.0.1",
"v8.0.0",
"v7.0.15",
"v7.0.14",
"v7.0.13",
"v7.0.12",
"v7.0.11",
"v7.0.10",
"v7.0.9",
"v7.0.8",
"v7.0.7",
"v7.0.6",
"v7.0.5",
"v7.0.4",
"v7.0.3",
"v7.0.2",
"v7.0.1",
"v7.0.0",
"v6.0.9",
"v6.0.8",
"v6.0.7",
"v6.0.6",
"v6.0.5",
"v6.0.4",
"v6.0.3",
"v6.0.2",
"v6.0.1",
"v5.3.6",
"v6.0.0",
"v5.3.5",
"v5.3.4",
"v5.3.3",
"v5.3.2",
"v5.3.1",
"v5.3.0",
"v5.2.1",
"v5.2.0",
"v5.1.0",
"v5.0.2",
"v5.0.1",
"v5.0.0",
"v4.0.2",
"v4.0.1",
"v4.0.0",
"v3.3.0",
"v3.2.1",
"v3.2.0",
"v3.1.4",
"v3.1.3",
"v3.1.2",
"v3.1.1",
"v3.1.0",
"v3.0.0",
"v2.1.5",
"v2.1.4",
"v2.1.3",
"v2.1.2",
"v2.1.1",
"v2.1.0",
"v2.0.0",
"v1.12.1",
"v1.12.0",
"v1.11.1",
"v1.11.0",
"v1.10.5",
"v1.10.4",
"v1.10.3",
"v1.10.2",
"v1.10.1",
"v1.10.0",
"v1.9.3",
"v1.9.2",
"v1.9.1",
"v1.9.0",
"v1.8.2",
"v1.8.1",
"v1.8.0",
"v1.7.4",
"v1.7.3",
"v1.7.1",
"v1.7.0",
"v1.5.0",
"v1.4.0",
"v1.2.0",
"v1.1.3",
"v1.1.2",
"v1.1.0",
"v1.0.3",
"1.0.3",
"v1.0.1",
"1.0.0",
"v0.8.1",
"v0.8.0",
"v0.7.0",
"v0.6.0",
"v0.5.0",
"v0.4.2",
"0.4.0",
"v0.3.0",
"v0.2.2",
"v0.2.1",
"v0.2.0",
"v0.1.2",
"v0.1.1",
"v0.1.0",
"v0.0.4"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-23436.json"
}
}
],
"modified": "2026-10-20T10:54:32.236759422Z",
"provider": "osv",
"references": [
"https://github.com/immerjs/immer/commit/fa671e55ee9bd42ae08cc239102b665a23958237",
"https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-1579266",
"https://snyk.io/vuln/SNYK-JS-IMMER-1540542"
],
"provider_metadata": {}
},
"related_cves": [
{
"value": "CVE-2021-23436",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 385506,
"published_at": "2021-09-01T18:15:08.477+00:00"
}