# CVE-2021-23436: Prototype Pollution

- Severity: Medium 5.6 (CVSS:3.1, scored by snyk) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.80%, higher than 79% of CVEs (2026-12-01)
- Public exploit code or proof of concept: 2 links below, marked "exploit"
- Published: 2021-09-01T17:30:09.902Z
- Modified: 2026-06-17T03:38:45.597Z
- Also known as: GHSA-33f9-j839-rf8h
- Weaknesses: CWE-843, CWE-1321
- Assigned by: snyk

## Description

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.

(As written by CVE List.)

## Affected

- immer: from unspecified before 9.0.6
- immer (npm): from 7.0.0 before 9.0.6
- immer_project immer: before 9.0.6

## Every score

- snyk: CVSS:3.1 5.6 Medium `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`
- GitHub: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:2.0 7.5 High `AV:N/AC:L/Au:N/C:P/I:P/A:P`

## References

- <https://snyk.io/vuln/SNYK-JS-IMMER-1540542> (exploit, patch, third-party-advisory, web)
- <https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-1579266> (exploit, patch, third-party-advisory, web)
- <https://github.com/immerjs/immer/commit/fa671e55ee9bd42ae08cc239102b665a23958237> (patch, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-23436> (advisory)
- <https://github.com/immerjs/immer> (package)

## Sources

- CVE List: [CVE-2021-23436](https://www.cve.org/CVERecord?id=CVE-2021-23436), CVE Terms of Use, modified 2024-09-16
- GitHub Advisory Database: [GHSA-33f9-j839-rf8h](https://github.com/advisories/GHSA-33f9-j839-rf8h), CC-BY-4.0, modified 2025-01-14
- NVD: [CVE-2021-23436](https://nvd.nist.gov/vuln/detail/CVE-2021-23436), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-23436 · Whole record: https://cve.day/CVE-2021-23436.json · Rebuilt by cve.day 2026-11-25T22:58:03.615Z
