The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2021-23436

CVE-2021-23436: Immer Auth Bypass Vulnerability

CVE-2021-23436 is an authentication bypass flaw in Immer before version 9.0.6 caused by type confusion. Attackers can exploit this to bypass security protections. This article covers technical details, affected versions, impact, and mitigation strategies.

Published: March 4, 2026

CVE-2021-23436 Overview

CVE-2021-23436 is a type confusion vulnerability affecting the popular Immer JavaScript library before version 9.0.6. This vulnerability allows attackers to bypass a previous prototype pollution fix (CVE-2020-28477) by exploiting JavaScript's strict equality operator behavior when comparing arrays to strings. Immer is widely used in React applications for immutable state management, making this vulnerability particularly impactful across the JavaScript ecosystem.

Critical Impact

This type confusion flaw enables attackers to achieve prototype pollution by supplying array-based keys in the path parameter, potentially leading to remote code execution, denial of service, or property injection attacks in Node.js applications using vulnerable Immer versions.

Affected Products

  • Immer_project Immer (versions prior to 9.0.6)
  • Node.js applications using vulnerable Immer versions
  • Java applications using Immer via WebJars (org.webjars.npm)

Discovery Timeline

  • September 1, 2021 - CVE-2021-23436 published to NVD
  • November 21, 2024 - Last updated in NVD database

Technical Details for CVE-2021-23436

Vulnerability Analysis

CVE-2021-23436 represents a type confusion vulnerability (CWE-843) that enables attackers to circumvent the prototype pollution protections previously implemented to address CVE-2020-28477. The vulnerability exists within the applyPatches_ function of the Immer library, where inadequate type checking allows malicious input to bypass security controls.

The core issue stems from how JavaScript's strict equality operator (===) handles comparisons between different data types. When the library attempts to validate user-provided path keys against dangerous property names like __proto__ or constructor, it uses strict equality comparison. This comparison returns false when comparing a string to an array, even if the array contains the same string value.

This flaw is particularly concerning given Immer's widespread adoption in React-based applications for managing immutable state. Successful exploitation could allow attackers to modify object prototypes, potentially leading to arbitrary property injection, denial of service, or in certain application contexts, remote code execution.

Root Cause

The root cause is a type confusion issue in the path parameter validation logic within the applyPatches_ function. The condition (p === "__proto__" || p === "constructor") fails to account for cases where p is an array containing these string values (e.g., ['__proto__']). Since JavaScript's strict equality operator returns false when comparing operands of different types, passing an array instead of a string effectively bypasses the security check.

Attack Vector

The attack is network-exploitable with low complexity and requires no privileges or user interaction. An attacker can craft malicious input where path keys are provided as arrays containing dangerous property names rather than as plain strings. When the Immer library processes patches with these array-based keys, the prototype pollution bypass is triggered.

The attack exploits the type coercion behavior in JavaScript where arrays can be implicitly converted to strings in certain contexts (like property access), but fail strict equality checks against string values. This allows an attacker to:

  1. Supply a patch operation with a path containing ['__proto__'] as an array element
  2. Bypass the string-based security check in applyPatches_
  3. Successfully pollute the prototype chain of objects processed by Immer

Detection Methods for CVE-2021-23436

Indicators of Compromise

  • Unexpected modifications to Object.prototype properties in Node.js application memory
  • Application crashes or unexpected behavior following the processing of user-controlled patch data
  • Unusual property values appearing across multiple unrelated objects in the application state
  • Error logs indicating prototype-related issues or unexpected property access patterns

Detection Strategies

  • Implement software composition analysis (SCA) to identify Immer versions below 9.0.6 in your dependency tree
  • Monitor application logs for abnormal patch operations containing array-based path elements
  • Deploy runtime application self-protection (RASP) solutions to detect prototype pollution attempts
  • Use static analysis tools to identify code paths where user input flows into Immer's applyPatches function

Monitoring Recommendations

  • Enable verbose logging for state management operations in applications using Immer
  • Monitor for attempts to access or modify __proto__ or constructor properties in application state
  • Implement input validation monitoring to detect array-based path parameters in patch operations
  • Track dependency versions in CI/CD pipelines to ensure vulnerable Immer packages are flagged

How to Mitigate CVE-2021-23436

Immediate Actions Required

  • Upgrade Immer to version 9.0.6 or later immediately across all projects
  • Audit application code for direct usage of applyPatches with user-controlled input
  • Implement input validation to reject array-based path parameters before they reach Immer
  • Review package-lock.json and yarn.lock files to identify transitive dependencies on vulnerable Immer versions

Patch Information

The Immer maintainers have addressed this vulnerability in version 9.0.6. The fix implements proper type checking to handle cases where path keys are provided as arrays. The security patch is available via the GitHub commit.

For detailed vulnerability information, refer to the Snyk JavaScript advisory and the Snyk Java WebJars advisory.

Workarounds

  • Implement strict input validation to ensure path parameters are strings, not arrays, before passing to Immer
  • Use Object.freeze on critical prototypes to prevent modification as a defense-in-depth measure
  • Consider wrapping Immer's applyPatches function with custom validation logic that rejects array-based keys
  • Isolate state management operations in sandboxed environments where prototype pollution impact is limited
bash
# Update Immer to patched version
npm update immer@^9.0.6

# Or install specific patched version
npm install immer@9.0.6

# Audit for vulnerable dependencies
npm audit --production

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeAuth Bypass

  • Vendor/TechImmer Project

  • SeverityCRITICAL

  • CVSS Score9.8

  • EPSS Probability0.10%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-843
  • Vendor Resources
  • GitHub Commit Change

  • Snyk Vulnerability SNYK-JAVA-ORGWEBJARSNPM-1579266

  • Snyk Vulnerability SNYK-JS-IMMER-1540542
  • Related CVEs
  • CVE-2021-3757: Immer Prototype Pollution Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English