CVE-2026-40931: CWE-59: Improper Link Resolution Before File Access ('Link Following') in node-modules compressing
CVE-2026-40931 is a high-severity vulnerability in the node-modules compressing library affecting versions prior to 2. 1. 1 and 1. 10. 5. It involves improper link resolution before file access, where a logical path validation check fails to consider the actual filesystem state, allowing attackers to bypass security checks via directory poisoning using pre-existing symbolic links. This can lead to unauthorized file access and potential compromise of confidentiality, integrity, and availability. The vulnerability has been fixed in versions 2. 1. 1 and 1.
AI Analysis
Technical Summary
The vulnerability in node-modules compressing arises from the isPathWithinParent utility performing a logical string check to verify if a resolved path starts with the destination directory string. However, this check does not account for the physical filesystem state, specifically symbolic links that can redirect paths outside the intended directory. Attackers can exploit this discrepancy, known as a Logical vs. Physical path divergence, using directory poisoning techniques with pre-existing symbolic links to bypass security restrictions. This flaw is tracked as CWE-59 (Improper Link Resolution Before File Access) and affects versions >=2.0.0 and <2.1.1, and versions <1.10.5. The issue was resolved in versions 2.1.1 and 1.10.5.
Potential Impact
Successful exploitation allows an attacker to bypass directory traversal protections and access or modify files outside the intended directory, potentially leading to full compromise of confidentiality, integrity, and availability of affected systems using vulnerable versions of the compressing library.
Mitigation Recommendations
A fix is available in node-modules compressing versions 2.1.1 and 1.10.5. Users should upgrade to these or later versions to remediate this vulnerability. There is no indication that temporary mitigations exist or that the vendor advises no action. Patch status is confirmed by the vendor advisory stating the vulnerability is fixed in these versions.
CVE-2026-40931: CWE-59: Improper Link Resolution Before File Access ('Link Following') in node-modules compressing
Description
CVE-2026-40931 is a high-severity vulnerability in the node-modules compressing library affecting versions prior to 2. 1. 1 and 1. 10. 5. It involves improper link resolution before file access, where a logical path validation check fails to consider the actual filesystem state, allowing attackers to bypass security checks via directory poisoning using pre-existing symbolic links. This can lead to unauthorized file access and potential compromise of confidentiality, integrity, and availability. The vulnerability has been fixed in versions 2. 1. 1 and 1.
CVSS v3.1
Score 8.4high
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in node-modules compressing arises from the isPathWithinParent utility performing a logical string check to verify if a resolved path starts with the destination directory string. However, this check does not account for the physical filesystem state, specifically symbolic links that can redirect paths outside the intended directory. Attackers can exploit this discrepancy, known as a Logical vs. Physical path divergence, using directory poisoning techniques with pre-existing symbolic links to bypass security restrictions. This flaw is tracked as CWE-59 (Improper Link Resolution Before File Access) and affects versions >=2.0.0 and <2.1.1, and versions <1.10.5. The issue was resolved in versions 2.1.1 and 1.10.5.
Potential Impact
Successful exploitation allows an attacker to bypass directory traversal protections and access or modify files outside the intended directory, potentially leading to full compromise of confidentiality, integrity, and availability of affected systems using vulnerable versions of the compressing library.
Mitigation Recommendations
A fix is available in node-modules compressing versions 2.1.1 and 1.10.5. Users should upgrade to these or later versions to remediate this vulnerability. There is no indication that temporary mitigations exist or that the vendor advises no action. Patch status is confirmed by the vendor advisory stating the vulnerability is fixed in these versions.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-04-15T20:40:15.518Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 69e7e91619fe3cd2cdfaec43
Added to database: 4/21/2026, 9:16:06 PM
Last enriched: 4/29/2026, 11:38:11 AM
Last updated: 6/5/2026, 9:51:34 AM
Views: 57
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.