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

CVE-2021-23337: Lodash Command Injection Vulnerability

CVE-2021-23337 is a command injection vulnerability in Lodash that enables remote code execution via the template function. This article covers the technical details, affected versions, security impact, and mitigation strategies.

Published: March 4, 2026

CVE-2021-23337 Overview

Lodash versions prior to 4.17.21 are vulnerable to Command Injection via the template function. Lodash is one of the most widely-used JavaScript utility libraries, providing helpful methods for manipulating arrays, objects, strings, and more. This vulnerability allows authenticated attackers with high privileges to execute arbitrary commands on systems where user-controlled input is passed to the _.template() function without proper sanitization.

Critical Impact

Authenticated attackers can achieve remote code execution by injecting malicious commands through the Lodash template function, potentially leading to complete system compromise, data exfiltration, or lateral movement within affected environments.

Affected Products

  • Lodash versions prior to 4.17.21
  • Oracle Banking Corporate Lending Process Management (14.2.0, 14.3.0, 14.5.0)
  • Oracle Banking Credit Facilities Process Management (14.2.0, 14.3.0, 14.5.0)
  • Oracle Banking Extensibility Workbench (14.2.0, 14.3.0, 14.5.0)
  • Oracle Communications Cloud Native Core Binding Support Function (1.9.0)
  • Oracle Communications Cloud Native Core Policy (1.11.0)
  • Oracle PeopleSoft Enterprise PeopleTools (8.58, 8.59)
  • Oracle Primavera Gateway and Primavera Unifier (multiple versions)
  • NetApp Active IQ Unified Manager, Cloud Manager, and System Manager
  • Siemens SINEC INS (versions prior to 1.0 SP2)

Discovery Timeline

  • February 15, 2021 - CVE-2021-23337 published to NVD
  • November 21, 2024 - Last updated in NVD database

Technical Details for CVE-2021-23337

Vulnerability Analysis

The vulnerability exists in the Lodash _.template() function, which compiles JavaScript template strings into functions that can be executed. This function is designed to interpolate data properties into template placeholders, but it uses JavaScript's Function constructor internally to generate the compiled template. When user-controlled input is passed to the template function without proper sanitization, an attacker can inject arbitrary JavaScript code that executes within the Node.js runtime context.

The attack requires high privileges (authenticated access) but can be executed remotely over a network with no user interaction required. Successful exploitation results in complete compromise of confidentiality, integrity, and availability of the affected system.

Root Cause

The root cause is improper input validation (CWE-94: Code Injection) in the template compilation process. The _.template() function dynamically constructs JavaScript code from template strings and executes it using the Function constructor. When template options or interpolation delimiters contain malicious code, this code is included in the generated function and executed during template rendering.

The vulnerability specifically occurs because the template function does not adequately sanitize or escape special characters and code sequences within the template source or options, allowing attackers to break out of the intended template context and inject arbitrary commands.

Attack Vector

An attacker with authenticated access to an application using vulnerable Lodash versions can exploit this vulnerability by:

  1. Identifying application endpoints that process user input through Lodash's _.template() function
  2. Crafting malicious input containing JavaScript code injection payloads
  3. Submitting the payload through the identified entry points
  4. The injected code executes within the Node.js process context, enabling command execution

The attack is network-accessible and requires no user interaction beyond the attacker's own actions. The vulnerability mechanism involves injecting code through template options or interpolation patterns that get evaluated by the JavaScript Function constructor during template compilation.

For technical implementation details, refer to the Snyk vulnerability report for SNYK-JS-LODASH-1040724 and the GitHub Lodash source code.

Detection Methods for CVE-2021-23337

Indicators of Compromise

  • Unexpected child processes spawned from Node.js applications using Lodash
  • Unusual network connections originating from Node.js server processes
  • Suspicious command execution patterns in application logs, particularly associated with template rendering functions
  • Anomalous file system modifications or data exfiltration attempts from web application contexts

Detection Strategies

  • Implement Software Composition Analysis (SCA) tools to identify vulnerable Lodash versions (prior to 4.17.21) in your dependency trees
  • Monitor application logs for unusual template rendering errors or exceptions that may indicate injection attempts
  • Deploy runtime application self-protection (RASP) solutions to detect code injection attempts at the application layer
  • Configure Web Application Firewalls (WAF) to flag requests containing suspicious template injection patterns

Monitoring Recommendations

  • Enable detailed logging for applications using Lodash template functionality
  • Monitor process creation events for Node.js applications, alerting on unexpected child processes
  • Implement file integrity monitoring on systems running affected applications
  • Track network connections from application servers to detect potential command-and-control communications

How to Mitigate CVE-2021-23337

Immediate Actions Required

  • Upgrade Lodash to version 4.17.21 or later across all affected applications and dependencies
  • Audit your codebase to identify all uses of _.template() with user-controlled input
  • Implement strict input validation and sanitization for any data passed to template functions
  • Review and update transitive dependencies that may bundle vulnerable Lodash versions

Patch Information

The vulnerability is addressed in Lodash version 4.17.21. Organizations should update their package.json dependencies and run npm update or yarn upgrade to pull in the patched version. For applications with locked dependency versions, explicit updates may be required.

Multiple vendors have released security advisories with patch information:

  • Oracle Security Alert CPU July 2021
  • Oracle Security Alert CPU October 2021
  • Oracle Security Alert CPU January 2022
  • Oracle Security Alert CPU July 2022
  • Siemens Security Advisory SSA-637483
  • NetApp Security Advisory NTAP-20210312-0006

Workarounds

  • Avoid using _.template() with any user-controlled input until patching is complete
  • Implement server-side template rendering in a sandboxed environment with restricted permissions
  • Use alternative template engines that do not rely on dynamic code evaluation
  • Apply Content Security Policy (CSP) headers to limit the impact of code injection in browser contexts
bash
# Update Lodash to patched version
npm update lodash --depth 9999
# Verify installed version
npm list lodash
# Expected output should show lodash@4.17.21 or higher

# For yarn users
yarn upgrade lodash@^4.17.21
yarn why lodash

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

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechLodash

  • SeverityHIGH

  • CVSS Score7.2

  • EPSS Probability0.28%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-94
  • Technical References
  • GitHub Lodash Source Code

  • NetApp Security Advisory NTAP-20210312-0006

  • Snyk Vulnerability SNYK-JAVA-ORGFUJIONWEBJARS-1074932

  • Snyk Vulnerability SNYK-JAVA-ORGWEBJARS-1074930

  • Snyk Vulnerability SNYK-JAVA-ORGWEBJARSBOWER-1074928

  • Snyk Vulnerability SNYK-JAVA-ORGWEBJARSBOWERGITHUBLODASH-1074931

  • Snyk Vulnerability SNYK-JAVA-ORGWEBJARSNPM-1074929

  • Snyk Vulnerability SNYK-JS-LODASH-1040724
  • Vendor Resources
  • Siemens Security Advisory SSA-637483

  • Oracle Security Alert CPU July 2021

  • Oracle Security Alert CPU January 2022

  • Oracle Security Alert CPU July 2022

  • Oracle Security Alert CPU October 2021
  • Related CVEs
  • CVE-2026-4800: Lodash Template RCE Vulnerability

  • CVE-2026-2950: Lodash Prototype Pollution Vulnerability

  • CVE-2025-13465: Lodash Prototype Pollution Vulnerability

  • CVE-2020-8203: Lodash Prototype Pollution 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