Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
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-2021-39134

CVE-2021-39134: Npmjs Arborist RCE Vulnerability

CVE-2021-39134 is a remote code execution vulnerability in Npmjs Arborist affecting case-insensitive file systems. Attackers can write arbitrary content to any filesystem location. This article covers technical details, affected versions, impact, and mitigation.

Published: February 25, 2026

CVE-2021-39134 Overview

CVE-2021-39134 is a symlink-based arbitrary file overwrite vulnerability in @npmcli/arborist, the core library responsible for calculating dependency trees and managing the node_modules folder hierarchy for the npm command line interface. The vulnerability exploits a case sensitivity mismatch between Arborist's internal data structures and case-insensitive file systems (macOS and Windows), allowing attackers to write arbitrary contents to any location on the filesystem through specially crafted package dependencies.

Critical Impact

Attackers can overwrite arbitrary files on case-insensitive file systems (Windows, macOS) by exploiting case sensitivity handling in npm's dependency resolution, potentially leading to full system compromise.

Affected Products

  • npmjs Arborist versions prior to 2.8.2
  • npmjs npm versions 7.20.6 and earlier
  • Oracle GraalVM Enterprise Edition 20.3.3 and 21.2.0
  • Siemens SINEC Infrastructure Network Services

Discovery Timeline

  • 2021-08-31 - CVE CVE-2021-39134 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2021-39134

Vulnerability Analysis

The vulnerability resides in how @npmcli/arborist handles package dependency resolution on case-insensitive file systems. Arborist's internal data structure treats package names with different letter casing (e.g., foo vs FOO) as separate, distinct items that can coexist at the same level within the node_modules hierarchy. However, on case-insensitive file systems like those used by macOS and Windows, these names refer to the same directory location.

When combined with symlink dependencies using the file: protocol specifier, this behavior creates a dangerous condition where the contents of one package can be extracted to an arbitrary filesystem location controlled by another package. The attack requires two malicious packages working in concert: one to establish a symlink to the target location and another to overwrite that location with attacker-controlled content.

Root Cause

The root cause is an improper handling of case-insensitive file systems (CWE-178) combined with symlink following vulnerability (CWE-61). Arborist's dependency resolution logic fails to account for the filesystem behavior where directory names differing only in case are treated as identical on macOS and Windows systems. The library's internal data structures permit case-variant names to coexist, but the actual filesystem cannot maintain this separation, leading to unintended file operations.

Attack Vector

This vulnerability requires local access and user interaction to exploit. An attacker must craft two malicious npm packages with coordinated dependency declarations:

  1. Package pwn-a declares a dependency using a symlink to the target path: "foo": "file:/some/path"
  2. Package pwn-b declares a dependency with case-variant name containing the payload: "FOO": "file:foo.tgz"

When a victim installs pwn-a followed by pwn-b on a case-insensitive file system, Arborist creates a symlink from node_modules/foo to /some/path. Subsequently, when processing the case-variant FOO dependency, Arborist extracts the contents of foo.tgz to what it believes is a separate node_modules/FOO directory, but the filesystem redirects this to /some/path, overwriting any existing contents at that location.

Detection Methods for CVE-2021-39134

Indicators of Compromise

  • Unexpected file modifications or deletions in system directories outside of node_modules
  • Package installations with dependencies containing case-variant names (e.g., foo and FOO or Bar and bar)
  • Presence of file: protocol dependencies pointing to system paths outside the project directory
  • Unusual symlinks within node_modules directories pointing to sensitive filesystem locations

Detection Strategies

  • Monitor npm install operations for packages with case-variant dependency names in their package.json manifests
  • Implement filesystem integrity monitoring on critical system directories during npm operations
  • Audit package.json and package-lock.json files for file: protocol dependencies targeting paths outside the project scope
  • Use software composition analysis (SCA) tools to detect vulnerable npm versions in development environments

Monitoring Recommendations

  • Enable audit logging for file system operations during npm package installations
  • Deploy endpoint detection solutions capable of monitoring for symlink-based attacks and unexpected file writes
  • Implement CI/CD pipeline checks to identify packages with suspicious file: protocol dependencies
  • Review npm audit reports regularly and alert on installations of vulnerable npm versions

How to Mitigate CVE-2021-39134

Immediate Actions Required

  • Upgrade npm to version 7.20.7 or later immediately on all case-insensitive file systems (Windows, macOS)
  • Update @npmcli/arborist to version 2.8.2 or later in projects using it as a direct dependency
  • Audit existing package-lock.json files for suspicious file: protocol dependencies
  • Run npm audit to identify potentially compromised packages in existing projects

Patch Information

The vulnerability is patched in @npmcli/arborist version 2.8.2, which is included in npm v7.20.7 and above. Users should verify their npm version using npm --version and upgrade if running 7.20.6 or earlier. For enterprise deployments, refer to the Oracle Security Alerts October 2021 for GraalVM patches and the Siemens Security Advisory SSA-389290 for SINEC Infrastructure Network Services updates. Additional details are available in the GitHub Security Advisory GHSA-2h3h-q99f-3fhc.

Workarounds

  • Use case-sensitive file systems where possible for npm development environments
  • Manually review all file: protocol dependencies before installing third-party packages
  • Implement strict package policies that prohibit file: protocol dependencies from untrusted sources
  • Consider using containerized development environments with isolated file systems
bash
# Verify npm version and upgrade if vulnerable
npm --version
# If version is 7.20.6 or earlier, upgrade immediately
npm install -g npm@latest

# Audit existing projects for vulnerabilities
npm audit

# Check for suspicious file: protocol dependencies
grep -r "file:" package.json package-lock.json

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

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechNpmjs

  • SeverityHIGH

  • CVSS Score7.8

  • EPSS Probability1.29%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityHigh
  • AvailabilityHigh
  • CWE References
  • CWE-61

  • CWE-178
  • Technical References
  • NPM Package Arborist Information
  • Vendor Resources
  • Siemens Security Advisory SSA-389290

  • GitHub Security Advisory GHSA-2h3h-q99f-3fhc

  • Oracle Security Alerts October 2021
  • Related CVEs
  • CVE-2022-25883: Npmjs Semver ReDoS 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