CVE-2026-40931
Complete Bypass of CVE-2026-24884 Patch via Git-Delivered Symlink Poisoning in compressing
Compressing is a compressing and uncompressing lib for node. Prior to 2.1.1 and 1.10.5, the patch for CVE-2026-24884 relies on a purely logical string validation within the isPathWithinParent utility. This check verifies if a resolved path string starts with the destination directory string but fails to account for the actual filesystem state. By exploiting this "Logical vs. Physical" divergence, an attacker can bypass the security check using a Directory Poisoning technique (pre-existing symbolic links). This vulnerability is fixed in 2.1.1 and 1.10.5.
Attack profile
How easy it is to exploit
- Attack vector
- Local
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
CVE List Score used
8.4
Complete Bypass of CVE-2026-24884 Patch via Git-Delivered Symlink Poisoning in compressing
Compressing is a compressing and uncompressing lib for node. Prior to 2.1.1 and 1.10.5, the patch for CVE-2026-24884 relies on a purely logical string validation within the isPathWithinParent utility. This check verifies if a resolved path string starts with the destination directory string but fails to account for the actual filesystem state. By exploiting this "Logical vs. Physical" divergence, an attacker can bypass the security check using a Directory Poisoning technique (pre-existing symbolic links). This vulnerability is fixed in 2.1.1 and 1.10.5.
- Record
CVE-2026-40931- CVSS 3.1
- 8.4 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-59
- Updated
- 2026-11-02
EUVDEUVD-2026-24488
8.4
Compressing is a compressing and uncompressing lib for node. Prior to 2.1.1 and 1.10.5, the patch for CVE-2026-24884 relies on a purely logical string validation within the isPathWithinParent utility. This check verifies if a resolved path string starts with the destination directory string but fails to account for the actual filesystem state. By exploiting this "Logical vs. Physical" divergence, an attacker can bypass the security check using a Directory Poisoning technique (pre-existing symbolic links). This vulnerability is fixed in 2.1.1 and 1.10.5.
- Record
EUVD-2026-24488- CVSS 3.1
- 8.4 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-4c3q-x735-j3r5
8.4
Complete Bypass of CVE-2026-24884 Patch via Git-Delivered Symlink Poisoning in compressing
1. Executive Summary
This report documents a critical security research finding in the compressing npm package (specifically tested on the latest v2.1.0). The core vulnerability is a Partial Fix Bypass of CVE-2026-24884.
The current patch relies on a purely logical string validation within the isPathWithinParent utility. This check verifies if a resolved path string starts with the destination directory string but fails to account for the actual filesystem state. By exploiting this "Logical vs. Physical" divergence, we successfully bypassed the security check using a Directory Poisoning technique (pre-existing symbolic links).
Key Findings:
- Vulnerable Component:
lib/utils.js->isPathWithinParent() - Flaw Type: Incomplete validation (lack of recursive
lstatchecks). - Primary Attack Vector: Supply Chain via Git Clone The attack requires zero victim interaction beyond standard developer workflow (
git clone+node app.js). Git natively preserves symlinks during clone, automatically deploying the malicious symlink to victim's machine without any additional attacker access. - Result: Successfully achieved arbitrary file writes outside the intended extraction root on the latest library version.
2. Deep-Dive: Technical Root Cause Analysis The vulnerability exists because of a fundamental disconnect between how the library validates a path and how the Operating System executes a write to that path.
-
1. Logical Abstraction (The "String" World) The developer uses
path.resolve(childPath)to sanitize input. In Node.js,path.resolveis a literal string manipulator. It calculates an absolute path by processing..and.segments relative to each other. -
The Limitation:
path.resolvedoes NOT look at the disk. It does not know if a folder namedconfigis a real folder or a symbolic link. -
The Result: If the extraction target is
/app/outand the entry is config/passwd,path.resolvereturns/app/out/config/passwd. Since this string starts with/app/out/, the security check returns TRUE. -
2. Physical Reality (The "Filesystem" World) When the library proceeds to write the file using
fs.writeFile('/app/out/config/passwd', data), the execution is handed over to the Operating System's filesystem kernel. -
The Redirection: If the attacker has pre-created a symbolic link on the disk at
/app/out/configpointing to/etc, the OS kernel sees the write request and follows the link. -
The Divergence: The OS resolves the path to
/etc/passwd. The "Security Guard" (the library) thought it was writing to a local config folder, but the "Executioner" (the OS) followed the link into a sensitive system area. -
3. Visual Logic Flow <img width="6582" height="3095" alt="Malicious Archive Exploit-2026-04-12-135626" src="https://github.com/user-attachments/assets/7c8235c3-f717-4296-b8e7-d6d498285fb2" />
-
4. Comparison with Industry Standards (
node-tar) A secure implementation (likenode-tar) uses an "Atomic Check" strategy. Instead of trusting a string path, it iterates through every directory segment and callsfs.lstatSync(). If any segment is found to be a symbolic link, the extraction is halted immediately before any write operation is attempted.compressinglacks this critical recursive verification step. -
5. Git Clone as a Delivery Mechanism: Git treats symlinks as first-class objects and restores them faithfully during clone. This means an attacker-controlled repository becomes a reliable delivery mechanism — the symlink is "pre-planted" automatically by git itself, removing any prerequisite of prior system access.
3. Comprehensive Attack Vector & Proof of Concept
PoC Overview: The Git Clone Vector This exploit leverages the fact that Git natively preserves symbolic links. By cloning a malicious repository, a victim unknowingly plants a "poisoned path" on their local disk. Why…
- Record
GHSA-4c3q-x735-j3r5- CVSS 3.1
- 8.4 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-59
- Updated
- 2026-11-02
NVD
8.4
Compressing is a compressing and uncompressing lib for node. Prior to 2.1.1 and 1.10.5, the patch for CVE-2026-24884 relies on a purely logical string validation within the isPathWithinParent utility. This check verifies if a resolved path string starts with the destination directory string but fails to account for the actual filesystem state. By exploiting this "Logical vs. Physical" divergence, an attacker can bypass the security check using a Directory Poisoning technique (pre-existing symbolic links). This vulnerability is fixed in 2.1.1 and 1.10.5.
- Record
CVE-2026-40931- CVSS 3.1
- 8.4 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - CVSS 3.1
- 7.8 High
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-59
- Updated
- 2026-11-02
OSV
8.4
Complete Bypass of CVE-2026-24884 Patch via Git-Delivered Symlink Poisoning in compressing
Compressing is a compressing and uncompressing lib for node. Prior to 2.1.1 and 1.10.5, the patch for CVE-2026-24884 relies on a purely logical string validation within the isPathWithinParent utility. This check verifies if a resolved path string starts with the destination directory string but fails to account for the actual filesystem state. By exploiting this "Logical vs. Physical" divergence, an attacker can bypass the security check using a Directory Poisoning technique (pre-existing symbolic links). This vulnerability is fixed in 2.1.1 and 1.10.5.
- Record
CVE-2026-40931- CVSS 3.1
- 8.4 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-59
- Updated
- 2026-11-02
OSVGHSA-4c3q-x735-j3r5
8.4
Complete Bypass of CVE-2026-24884 Patch via Git-Delivered Symlink Poisoning in compressing
1. Executive Summary
This report documents a critical security research finding in the compressing npm package (specifically tested on the latest v2.1.0). The core vulnerability is a Partial Fix Bypass of CVE-2026-24884.
The current patch relies on a purely logical string validation within the isPathWithinParent utility. This check verifies if a resolved path string starts with the destination directory string but fails to account for the actual filesystem state. By exploiting this "Logical vs. Physical" divergence, we successfully bypassed the security check using a Directory Poisoning technique (pre-existing symbolic links).
Key Findings:
- Vulnerable Component:
lib/utils.js->isPathWithinParent() - Flaw Type: Incomplete validation (lack of recursive
lstatchecks). - Primary Attack Vector: Supply Chain via Git Clone The attack requires zero victim interaction beyond standard developer workflow (
git clone+node app.js). Git natively preserves symlinks during clone, automatically deploying the malicious symlink to victim's machine without any additional attacker access. - Result: Successfully achieved arbitrary file writes outside the intended extraction root on the latest library version.
2. Deep-Dive: Technical Root Cause Analysis The vulnerability exists because of a fundamental disconnect between how the library validates a path and how the Operating System executes a write to that path.
-
1. Logical Abstraction (The "String" World) The developer uses
path.resolve(childPath)to sanitize input. In Node.js,path.resolveis a literal string manipulator. It calculates an absolute path by processing..and.segments relative to each other. -
The Limitation:
path.resolvedoes NOT look at the disk. It does not know if a folder namedconfigis a real folder or a symbolic link. -
The Result: If the extraction target is
/app/outand the entry is config/passwd,path.resolvereturns/app/out/config/passwd. Since this string starts with/app/out/, the security check returns TRUE. -
2. Physical Reality (The "Filesystem" World) When the library proceeds to write the file using
fs.writeFile('/app/out/config/passwd', data), the execution is handed over to the Operating System's filesystem kernel. -
The Redirection: If the attacker has pre-created a symbolic link on the disk at
/app/out/configpointing to/etc, the OS kernel sees the write request and follows the link. -
The Divergence: The OS resolves the path to
/etc/passwd. The "Security Guard" (the library) thought it was writing to a local config folder, but the "Executioner" (the OS) followed the link into a sensitive system area. -
3. Visual Logic Flow <img width="6582" height="3095" alt="Malicious Archive Exploit-2026-04-12-135626" src="https://github.com/user-attachments/assets/7c8235c3-f717-4296-b8e7-d6d498285fb2" />
-
4. Comparison with Industry Standards (
node-tar) A secure implementation (likenode-tar) uses an "Atomic Check" strategy. Instead of trusting a string path, it iterates through every directory segment and callsfs.lstatSync(). If any segment is found to be a symbolic link, the extraction is halted immediately before any write operation is attempted.compressinglacks this critical recursive verification step. -
5. Git Clone as a Delivery Mechanism: Git treats symlinks as first-class objects and restores them faithfully during clone. This means an attacker-controlled repository becomes a reliable delivery mechanism — the symlink is "pre-planted" automatically by git itself, removing any prerequisite of prior system access.
3. Comprehensive Attack Vector & Proof of Concept
PoC Overview: The Git Clone Vector This exploit leverages the fact that Git natively preserves symbolic links. By cloning a malicious repository, a victim unknowingly plants a "poisoned path" on their local disk. Why…
- Record
GHSA-4c3q-x735-j3r5- CVSS 3.1
- 8.4 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-59
- Updated
- 2026-11-02
OSVCLSA-2026-1792369075 No score
TuxCare security update for compressing (2 CVEs)
TuxCare rebuilt compressing to address 2 CVEs. Fixed in 1.10.0-tuxcare.1.
- Record
CLSA-2026-1792369075- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
compressingnpm |
2.0.0 to 2.1.0 | 2.1.1 |
compressingnpm |
through 1.10.4 | 1.10.5 |
compressingTuxCare:npm From an advisory covering 2 CVEs |
1.10.0-tuxcare.0 up to 1.10.0-tuxcare.1, plus listed versions 1.10.0 |
1.10.0-tuxcare.1 |
compressingnpm |
2.0.0 up to 2.1.1 | 2.1.1 |
compressingnpm |
before 1.10.5 | 1.10.5 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | ||
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2026-40931 is a high vulnerability (CVSS 8.4) in Node-modules Compressing, published April 17, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.26%, the 17th percentile. Fixed in compressing 2.1.1.
References
Left out here: the rest of 2 source descriptions. The JSON record has them.