Docker Compose Vulnerable to Path Traversal via OCI Artifact Layer Annotations
CVE-2025-62725Published 27 Oct 2025, 20:37 UTC
Real-world risk
2.8/ 10Low
Routine
If the vulnerable configuration applies to you: 6.3
PreliminaryFrom the CVSS vector only · confidence low
CVSS
8.9
scored by the vendor (CNA), CVSS 4.0
In plain words
No plain-language summary yet. The original description is below.
Original description (from GitHub_M)
Docker Compose trusts the path information embedded in remote OCI compose artifacts. When a layer includes the annotations com.docker.compose.extends or com.docker.compose.envfile, Compose joins the attacker‑supplied value from com.docker.compose.file/com.docker.compose.envfile with its local cache directory and writes the file there. This affects any platform or workflow that resolves remote OCI compose artifacts, Docker Desktop, standalone Compose binaries on Linux, CI/CD runners, cloud dev environments is affected. An attacker can escape the cache directory and overwrite arbitrary files on the machine running docker compose, even if the user only runs read‑only commands such as docker compose config or docker compose ps. This issue is fixed in v2.40.2.
Am I affected?
| Product | Affected versions (from the sources) | Fixed in |
|---|---|---|
| composeNiche | < 2.40.2 | 2.40.2 |
What to do
Update to a fixed version: 2.40.2.
Why this score
| Factor | Value | Evidence | × |
|---|---|---|---|
| Impact | Full compromiseCode execution or full control of the system or application | From the CVSS vector | 1.00 |
| Attacker position | InternetAnyone on the Internet can reach a typical deployment | From the CVSS vector | 1.00 |
| Privileges needed | NoneNo account | From the CVSS vector | 1.00 |
| Victim interaction | RoutineA normal action: open a file, visit a page, click a link | From the CVSS vector | 0.70 |
| Configuration | UncommonNeeds a non-default feature that a minority enables | From the CVSS vector | 0.45 |
| Reliability | ReliableDeterministic: injection, logic bug, path traversal | From the CVSS vector | 1.00 |
Threat level T2: Likely to be exploited (× 0.90)
EPSS probability at least 0.10, or EPSS percentile at least 0.95
EPSS 16.5% chance of exploitation in 30 days (percentile 97), as of 2026-12-02.
The arithmetic
- Prerequisites multiplied together0.315
- Threat T2: Likely to be exploited0.900
- 10 × impact 1 × prerequisites 0.315 × threat 0.92.835
- Rounded to one decimal between 0.1 and 102.8
Exploitation and evidence timeline
- 27 Oct 2025 Published
- 3 Dec 2026 Risk 2.8 (cvss fallback)
Weakness
CWE-22