Skip to content

Prototype Pollution in immer

Critical severity GitHub Reviewed Published Sep 2, 2021 to the GitHub Advisory Database • Updated Apr 30, 2024

Package

npm immer (npm)

Affected versions

>= 7.0.0, < 9.0.6

Patched versions

9.0.6

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.

References

Published by the National Vulnerability Database Sep 1, 2021
Reviewed Sep 2, 2021
Published to the GitHub Advisory Database Sep 2, 2021
Last updated Apr 30, 2024

Severity

Critical
9.8
/ 10

CVSS base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

CVE ID

CVE-2021-23436

GHSA ID

GHSA-33f9-j839-rf8h

Source code

Credits

Checking history
See something to contribute? Suggest improvements for this vulnerability.