# CVE-2026-40931: Complete Bypass of CVE-2026-24884 Patch via Git-Delivered Symlink Poisoning in compressing

> Attackers can bypass path validation in the compressing library using symlink poisoning to read or modify files outside the intended directory.

- **Severity:** High 8.4 (`CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 21 Apr 2026
- **Updated:** 22 Apr 2026
- **Also known as:** GHSA-4c3q-x735-j3r5

## What is CVE-2026-40931?

CVE-2026-40931 is a high-severity path traversal vulnerability in node-modules compressing, published on 21 Apr 2026. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

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.

Weakness: CWE-59 (Improper Link Resolution Before File Access)

## Which versions are affected by CVE-2026-40931?

4 open source packages ship an affected version, including compressing. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `compressing` | npm | All versions | 1.10.5 |
| `compressing` | npm | All versions | 1.10.5 |
| `compressing` | npm | From 2.0.0 | 2.1.1 |
| `compressing` | npm | From 2.0.0 | 2.1.1 |

Products: Node-Modules Compressing.

## How do I fix CVE-2026-40931?

Upgrade compressing to a fixed version for your release line: 1.10.5 or 2.1.1.

## Is CVE-2026-40931 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-40931 exists.

## Other vulnerabilities in node-modules compressing

- [CVE-2026-24884](https://insights.sbomify.com/CVE-2026-24884/): Compressing Vulnerable to Arbitrary File Write via Symlink Extraction (high 8.4)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-40931 and fix it if it is affected.

What it is: CVE-2026-40931 is a high-severity path traversal vulnerability in node-modules compressing, published on 21 Apr 2026. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-40931 exists.

Affected packages and fixed versions:
- compressing (npm): affected all versions; fixed in 1.10.5
- compressing (npm): affected all versions; fixed in 1.10.5
- compressing (npm): affected from 2.0.0; fixed in 2.1.1
- compressing (npm): affected from 2.0.0; fixed in 2.1.1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-40931/ (Markdown: https://insights.sbomify.com/CVE-2026-40931/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-40931
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-40931
- OSV: https://osv.dev/vulnerability/CVE-2026-40931

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-40931/
Summaries are generated and may contain mistakes; the official description above is the record.
