CVE-2021-23436
JavaScript vulnerability analysis and mitigation

Overview

A type confusion vulnerability (CVE-2021-23436) was discovered in the Node.js immer module affecting versions 7.0.0 to 9.0.6. The vulnerability allows bypassing the previous fix for CVE-2020-28477 when user-provided keys used in the path parameter are arrays (SNYK-JS-IMMER-1540542).

Technical details

The vulnerability exists because the condition (p === "proto" || p === "constructor") in applyPatches_ returns false if p is ['proto'] (or ['constructor']). This occurs because the === operator (strict equality operator) returns false if the operands have different types. When array values are provided as input, the type confusion allows bypassing the prototype pollution protection that was implemented to fix CVE-2020-28477 (SNYK-JS-IMMER-1540542, GitHub Commit).

Impact

The vulnerability could lead to prototype pollution, which allows an attacker to inject properties into existing JavaScript language construct prototypes. This can result in denial of service by triggering JavaScript exceptions or tampering with application source code to force unintended code execution paths (SNYK-JS-IMMER-1540542).

Mitigation and workarounds

The vulnerability was fixed in version 9.0.6 of the immer package. The fix prevents this scenario by converting the path components to a string before being checked if they are not already of number or string type. Users should upgrade to version 9.0.6 or higher (SNYK-JS-IMMER-1540542).

Additional resources


SourceThis report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-22610HIGH8.5
  • JavaScriptJavaScript
  • angular.js
NoYesJan 10, 2026
CVE-2026-22595HIGH8.1
  • JavaScriptJavaScript
  • ghost
NoYesJan 10, 2026
CVE-2026-22594HIGH8.1
  • JavaScriptJavaScript
  • ghost
NoYesJan 10, 2026
CVE-2026-22596MEDIUM6.7
  • JavaScriptJavaScript
  • ghost
NoYesJan 10, 2026
CVE-2026-22597LOW2
  • JavaScriptJavaScript
  • ghost
NoYesJan 10, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management