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-22940

CVE-2021-22940: Node.js Use After Free Vulnerability

CVE-2021-22940 is a use after free vulnerability in Node.js that enables attackers to exploit memory corruption and alter process behavior. This article covers technical details, affected versions, security impact, and mitigation.

Published: March 4, 2026

CVE-2021-22940 Overview

CVE-2021-22940 is a use after free vulnerability affecting Node.js versions before 16.6.1, 14.17.5, and 12.22.5. This memory corruption flaw allows an attacker to potentially exploit freed memory to change process behavior, leading to integrity compromise of affected systems. The vulnerability is network-exploitable and requires no privileges or user interaction, making it particularly dangerous in server-side Node.js deployments.

Critical Impact

Attackers can exploit memory corruption to modify process behavior in Node.js applications, potentially leading to integrity violations and unauthorized process manipulation.

Affected Products

  • Node.js versions before 16.6.1, 14.17.5, and 12.22.5
  • Oracle GraalVM Enterprise Edition 20.3.3 and 21.2.0
  • Oracle JD Edwards EnterpriseOne Tools
  • Oracle PeopleSoft Enterprise PeopleTools 8.57, 8.58, and 8.59
  • NetApp NextGen API
  • Siemens SINEC Infrastructure Network Services
  • Debian Linux 10.0

Discovery Timeline

  • August 16, 2021 - CVE-2021-22940 published to NVD
  • November 21, 2024 - Last updated in NVD database

Technical Details for CVE-2021-22940

Vulnerability Analysis

This vulnerability is classified as CWE-416 (Use After Free), a memory corruption issue where an application continues to use a pointer after the memory it references has been freed. In the context of Node.js, this flaw enables attackers to manipulate process behavior by exploiting the memory corruption condition.

The vulnerability is network-accessible and can be exploited without authentication or user interaction. While the confidentiality and availability of the system remain unaffected, the integrity of the process can be compromised, allowing attackers to potentially alter application behavior or data processing.

Root Cause

The root cause stems from improper memory management within Node.js where memory is deallocated but references to that memory continue to be used. This use after free condition occurs when the application fails to properly track memory lifecycle, leaving dangling pointers that can be exploited. When the freed memory is reallocated for other purposes and the old pointer is dereferenced, memory corruption can occur.

Attack Vector

The attack vector for CVE-2021-22940 is network-based, allowing remote exploitation. An attacker can send specially crafted requests or data to a vulnerable Node.js application to trigger the use after free condition. The exploitation does not require any privileges or authentication, and no user interaction is needed to successfully exploit this vulnerability.

The attack flow involves:

  1. Triggering a code path that causes memory to be freed
  2. Allocating new memory that occupies the same address space
  3. Causing the application to use the stale pointer, referencing the attacker-controlled data
  4. Manipulating the process behavior through the corrupted memory state

For detailed technical information on the vulnerability mechanics, refer to the HackerOne Report #1238162 and the Node.js Vulnerability Blog Post.

Detection Methods for CVE-2021-22940

Indicators of Compromise

  • Unexpected process behavior or crashes in Node.js applications
  • Memory access violations or segmentation faults in application logs
  • Anomalous network traffic patterns targeting Node.js services
  • Evidence of memory corruption in application core dumps

Detection Strategies

  • Monitor Node.js application logs for memory-related errors, crashes, or abnormal terminations
  • Deploy runtime application self-protection (RASP) solutions to detect memory corruption attempts
  • Implement network intrusion detection rules for suspicious traffic patterns targeting Node.js endpoints
  • Use SentinelOne Singularity to detect exploitation attempts through behavioral analysis

Monitoring Recommendations

  • Enable verbose logging for Node.js applications to capture memory-related warnings
  • Configure alerting for unexpected application restarts or crashes
  • Monitor system memory usage patterns for anomalies indicating exploitation attempts
  • Track and inventory all Node.js versions deployed across the environment

How to Mitigate CVE-2021-22940

Immediate Actions Required

  • Upgrade Node.js to version 16.6.1 or later, 14.17.5 or later, or 12.22.5 or later immediately
  • Review and update Oracle GraalVM, JD Edwards EnterpriseOne Tools, and PeopleSoft Enterprise PeopleTools to patched versions
  • Apply Siemens security patches as outlined in Siemens Security Advisory SSA-389290
  • Conduct a comprehensive inventory of all Node.js deployments to identify vulnerable instances

Patch Information

Security patches are available from Node.js and affected vendors. Organizations should apply the following updates:

  • Node.js: Upgrade to versions 16.6.1, 14.17.5, or 12.22.5 or later. Refer to the Node.js Vulnerability Blog Post for details.
  • Oracle Products: Apply patches from Oracle CPU October 2021, Oracle CPU January 2022, and Oracle CPU July 2022.
  • Siemens Products: Apply updates per Siemens Security Advisory SSA-389290.
  • Debian Linux: Apply updates per the Debian LTS Announcement October 2022.
  • NetApp Products: Refer to NetApp Security Advisory NTAP-20210923-0001.

Workarounds

  • Implement network segmentation to limit exposure of Node.js applications to untrusted networks
  • Deploy Web Application Firewalls (WAF) to filter potentially malicious requests
  • Consider containerization with memory isolation to limit impact of exploitation
  • Implement rate limiting and input validation at the application layer
bash
# Verify Node.js version and upgrade if vulnerable
node --version
# If version is below 16.6.1, 14.17.5, or 12.22.5, upgrade immediately
# Using nvm (Node Version Manager)
nvm install 16.6.1
nvm use 16.6.1
# Or using package manager
apt-get update && apt-get install nodejs=16.6.1

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

  • Vulnerability Details
  • TypeUse After Free

  • Vendor/TechNodejs

  • SeverityHIGH

  • CVSS Score7.5

  • EPSS Probability0.41%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-416
  • Technical References
  • HackerOne Report #1238162

  • Debian LTS Announcement October 2022

  • Gentoo GLSA 202401-02

  • NetApp Security Advisory NTAP-20210923-0001
  • Vendor Resources
  • Siemens Security Advisory SSA-389290

  • Node.js Vulnerability Blog Post

  • Oracle CPU January 2022 Security Alert

  • Oracle CPU July 2022 Security Alert

  • Oracle CPU October 2021 Security Alert
  • Related CVEs
  • CVE-2021-22930: Node.js Use After Free Vulnerability

  • CVE-2020-8265: Node.js Use-After-Free Vulnerability

  • CVE-2020-8174: Node.js Use-After-Free Vulnerability

  • CVE-2026-21711: Node.js Privilege Escalation Vulnerability
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