Skip to content

Prototype Pollution in immer

critical severity Published Sep 2, 2021 • Updated Sep 13, 2021

Package

npm immer (npm)

Affected versions

< 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

CVE ID

CVE-2021-23436

CVSS Score

9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H