A Leader in the 2026 Gartner® Magic Quadrant™ for Endpoint Protection. Six years running.Six years. Gartner® Magic Quadrant™ Leader.Find Out Why
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
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • 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-2024-21541

CVE-2024-21541: Dom-iterator RCE Vulnerability

CVE-2024-21541 is a remote code execution vulnerability in the dom-iterator package caused by unsafe use of the Function constructor. This article covers the technical details, affected versions, impact, and mitigation.

Published: April 8, 2026

CVE-2024-21541 Overview

CVE-2024-21541 is an Arbitrary Code Execution vulnerability affecting the dom-iterator npm package prior to version 1.0.1. The vulnerability stems from the unsafe use of JavaScript's Function constructor without proper input sanitization, allowing attackers to inject and execute arbitrary code within applications that process untrusted input through the affected library.

Critical Impact

Applications using vulnerable versions of dom-iterator may allow attackers to execute arbitrary JavaScript code, potentially leading to complete application compromise, data theft, or lateral movement within affected systems.

Affected Products

  • matthewmueller dom-iterator versions before 1.0.1
  • Node.js applications incorporating vulnerable dom-iterator package
  • Java applications using org.webjars.npm dom-iterator WebJar

Discovery Timeline

  • 2024-11-13 - CVE-2024-21541 published to NVD
  • 2025-01-14 - Last updated in NVD database

Technical Details for CVE-2024-21541

Vulnerability Analysis

This vulnerability is classified as CWE-94 (Improper Control of Generation of Code), commonly known as Code Injection. The dom-iterator package, designed for iterating over DOM nodes in JavaScript applications, contains a critical flaw in how it handles dynamic function generation.

The root issue lies in the use of JavaScript's Function constructor to create new function bodies from input parameters. When attacker-controlled data reaches this constructor without adequate sanitization, it enables arbitrary code execution within the application context. This vulnerability pattern shares significant risk characteristics with the well-known dangers of eval() injection.

The impact is particularly concerning for server-side JavaScript applications (Node.js) where code execution could lead to server compromise, though client-side applications are also at risk of cross-site scripting style attacks through this vector.

Root Cause

The vulnerability originates from the Function constructor being invoked with insufficiently sanitized inputs. The Function constructor in JavaScript dynamically compiles and executes code from string arguments, making it extremely dangerous when combined with user-controllable input. The dom-iterator package failed to implement complete input validation before passing data to this constructor, creating an injection point for malicious code.

Attack Vector

This vulnerability is exploitable over the network without requiring authentication or user interaction. An attacker can craft malicious input that, when processed by the vulnerable dom-iterator functions, results in the execution of arbitrary JavaScript code.

The attack scenario typically involves:

  1. An application using dom-iterator processes external or user-provided data
  2. The attacker crafts input containing JavaScript code payloads
  3. The unsanitized input reaches the Function constructor
  4. The malicious code executes within the application's security context

Successful exploitation could allow attackers to access sensitive data, modify application behavior, establish persistence, or pivot to other systems depending on the application's permissions and network position.

Detection Methods for CVE-2024-21541

Indicators of Compromise

  • Unexpected JavaScript execution patterns in application logs
  • Unusual network connections originating from Node.js processes
  • Anomalous DOM manipulation or iteration behaviors in client-side applications
  • Evidence of code injection attempts in input validation logs

Detection Strategies

  • Implement Software Composition Analysis (SCA) to identify dom-iterator versions below 1.0.1 in your dependency tree
  • Monitor for unusual process spawning from Node.js applications
  • Deploy Web Application Firewalls (WAF) with rules to detect code injection patterns
  • Review application logs for anomalous function execution or unexpected eval-like behaviors

Monitoring Recommendations

  • Enable verbose logging for applications using dom-iterator to capture input processing
  • Implement runtime application self-protection (RASP) to detect code injection attempts
  • Monitor package.json and lock files for vulnerable dom-iterator versions
  • Set up alerts for dependency audit failures in CI/CD pipelines

How to Mitigate CVE-2024-21541

Immediate Actions Required

  • Update dom-iterator to version 1.0.1 or later immediately
  • Run npm audit or yarn audit to identify vulnerable packages in your projects
  • Review applications for any instances where untrusted input may reach dom-iterator functions
  • Consider implementing input validation at application boundaries as defense-in-depth

Patch Information

The vulnerability has been addressed in dom-iterator version 1.0.1. The fix is available via the GitHub commit 9e0e0fa which implements proper input sanitization before the Function constructor is invoked.

For additional technical details on this vulnerability, refer to the Snyk JavaScript advisory and the Snyk Java WebJar advisory.

Workarounds

  • If immediate patching is not possible, implement strict input validation to reject any data containing JavaScript code constructs before it reaches dom-iterator
  • Consider temporarily replacing dom-iterator with alternative DOM traversal methods that don't rely on dynamic function generation
  • Deploy Content Security Policy (CSP) headers to limit the impact of potential code execution in browser environments
  • Isolate affected applications in sandboxed environments to contain potential compromise
bash
# Update dom-iterator to patched version
npm update dom-iterator@^1.0.1

# Verify installed version
npm list dom-iterator

# Run security audit to confirm fix
npm audit

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

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechDom Iterator

  • SeverityMEDIUM

  • CVSS Score6.9

  • EPSS Probability0.32%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityLow
  • CWE References
  • CWE-94
  • Technical References
  • GitHub Commit Update

  • Snyk Java Vulnerability SNYK-JAVA-ORGWEBJARSNPM-8383166

  • Snyk JavaScript Vulnerability SNYK-JS-DOMITERATOR-6157199
  • Latest CVEs
  • CVE-2024-8261: Prolizyazilim OBS Auth Bypass Vulnerability

  • CVE-2024-13068: LimonDesk Auth Bypass Vulnerability

  • CVE-2025-53679: Fortinet FortiSandbox RCE Vulnerability

  • CVE-2026-9446: Simple POS Inventory System SQLi Flaw
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today 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