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-2026-40931

CVE-2026-40931: Node-modules Compressing Path Traversal

CVE-2026-40931 is a path traversal flaw in Node-modules Compressing that allows attackers to bypass security checks using directory poisoning. This article covers technical details, affected versions, and patches.

Published: April 23, 2026

CVE-2026-40931 Overview

CVE-2026-40931 is a symlink attack vulnerability affecting the Compressing library for Node.js, a popular compression and decompression utility. The vulnerability exists because the security patch for CVE-2026-24884 implemented a purely logical string validation within the isPathWithinParent utility function. This check verifies if a resolved path string starts with the destination directory string but critically fails to account for the actual filesystem state, creating a "Logical vs. Physical" divergence that attackers can exploit.

By leveraging pre-existing symbolic links on the filesystem (a technique known as Directory Poisoning), an attacker can bypass the path traversal security check and potentially write files outside the intended extraction directory. This vulnerability represents an incomplete fix scenario where the original mitigation was insufficient to address all attack vectors.

Critical Impact

Attackers can bypass path traversal protections using pre-existing symbolic links, potentially leading to arbitrary file write operations outside the intended destination directory with local access.

Affected Products

  • node-modules compressing versions prior to 2.1.1
  • node-modules compressing versions prior to 1.10.5
  • Node.js applications using vulnerable compressing library versions

Discovery Timeline

  • April 21, 2026 - CVE-2026-40931 published to NVD
  • April 23, 2026 - Last updated in NVD database

Technical Details for CVE-2026-40931

Vulnerability Analysis

This vulnerability falls under CWE-59 (Improper Link Resolution Before File Access), commonly known as a symlink attack. The root issue stems from the incomplete nature of the patch for CVE-2026-24884. While the original fix introduced path validation through the isPathWithinParent utility function, this validation operates purely on string comparisons of resolved paths rather than verifying the actual filesystem topology.

The vulnerability requires local access to exploit, as the attacker must have the ability to create symbolic links on the target filesystem prior to the decompression operation. Once a malicious symlink is in place, the extraction process can be manipulated to write files to arbitrary locations outside the intended destination directory, potentially overwriting sensitive configuration files or injecting malicious code into application directories.

Root Cause

The fundamental flaw lies in the disconnect between logical path validation and physical filesystem reality. The isPathWithinParent function performs string-based validation by checking if a resolved path begins with the expected destination directory path. However, this approach does not account for symbolic links that may redirect file operations to entirely different filesystem locations.

When a symbolic link exists within the destination directory pointing to an external location, the path resolution returns a string that passes the validation check, but the actual file write operation follows the symlink to an unintended location. This creates a Time-of-Check to Time-of-Use (TOCTOU) style vulnerability where the security decision is made based on string data that does not reflect the true filesystem behavior.

Attack Vector

The attack requires local access and follows a Directory Poisoning methodology. An attacker first creates symbolic links within the target extraction directory (or a path that will become the extraction directory). These symlinks point to sensitive locations outside the intended destination, such as system configuration directories or application code paths.

When a legitimate user or automated process extracts an archive using the vulnerable compressing library, the path validation passes because the resolved path strings appear to be within the destination directory. However, when files are actually written, the filesystem follows the symbolic links, resulting in file writes to the attacker-controlled external locations.

The vulnerability exploitation mechanism leverages pre-existing symlinks to bypass string-based path validation. The isPathWithinParent check compares resolved path strings without verifying actual filesystem topology, allowing writes to follow symlinks outside the intended destination. For complete technical details, refer to the GitHub Security Advisory.

Detection Methods for CVE-2026-40931

Indicators of Compromise

  • Unexpected symbolic links appearing in directories commonly used for archive extraction
  • File modification timestamps in system directories that correlate with archive extraction operations
  • Presence of the vulnerable compressing library versions (< 2.1.1 or < 1.10.5) in package.json or package-lock.json files
  • Log entries showing extraction operations followed by unexpected file changes outside extraction directories

Detection Strategies

  • Implement file integrity monitoring on critical system directories and application paths to detect unauthorized modifications
  • Audit Node.js application dependencies using npm audit or similar tools to identify vulnerable compressing library versions
  • Monitor filesystem operations for symlink creation in commonly used extraction directories
  • Review application logs for archive extraction operations and correlate with file system change events

Monitoring Recommendations

  • Deploy SentinelOne agents configured to monitor for suspicious symlink creation patterns in application directories
  • Enable filesystem auditing on directories where archive extraction commonly occurs
  • Implement Software Composition Analysis (SCA) scanning in CI/CD pipelines to catch vulnerable dependencies before deployment
  • Set up alerts for package.json changes that introduce or retain vulnerable compressing library versions

How to Mitigate CVE-2026-40931

Immediate Actions Required

  • Update the compressing library to version 2.1.1 or later for the 2.x branch
  • Update the compressing library to version 1.10.5 or later for the 1.x branch
  • Audit applications for any uses of the compressing library and prioritize updates based on exposure
  • Review extraction directories for any suspicious symbolic links that may have been placed by attackers

Patch Information

The vulnerability has been addressed in compressing versions 2.1.1 and 1.10.5. The fix improves the path validation logic to properly account for symbolic links in the filesystem, preventing the Directory Poisoning attack vector. Organizations should update to these patched versions as soon as possible.

For detailed patch information and the security advisory, refer to the GitHub Security Advisory GHSA-4c3q-x735-j3r5.

Workarounds

  • Ensure extraction directories are created fresh and do not contain pre-existing symbolic links before extraction operations
  • Implement application-level checks to verify no symlinks exist in destination directories prior to archive extraction
  • Run extraction operations in isolated environments or containers with restricted filesystem access
  • Apply the principle of least privilege to processes performing archive extraction operations
bash
# Configuration example
# Update compressing library to patched version
npm update compressing@2.1.1

# Or for 1.x branch
npm update compressing@1.10.5

# Verify installed version
npm list compressing

# Audit for vulnerabilities
npm audit

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

  • Vulnerability Details
  • TypePath Traversal

  • Vendor/TechNode Modules Compressing

  • SeverityHIGH

  • CVSS Score7.8

  • EPSS Probability0.01%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-59
  • Vendor Resources
  • GitHub Security Advisory
  • Latest CVEs
  • CVE-2026-9813: FlowIntel SSRF Vulnerability

  • CVE-2026-4377: D-Link DWR-X1820 Auth Bypass Vulnerability

  • CVE-2026-47074: ex_aws_sns Auth Bypass Vulnerability

  • CVE-2026-46241: Linux Kernel Use-After-Free Vulnerability
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