CVEs / CVE-2025-62725
CVE-2025-62725: docker compose vulnerability
- high 8.9 CVSS 4.0 (from the CNA)
- EPSS 15.7% chance of exploitation in the next 30 days, higher than 96% of CVEs (4 Nov 2026)
- Last changed at its sources
Are you affected? Check your servers with Stackurity: it lists the software on each server and the vulnerabilities to fix first.
Check your servers with Stackurity Already using Stackurity? Search for CVE-2025-62725
Description
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.
Affected and fixed versions
| Product | Affected | Fixed in |
|---|---|---|
| docker compose | < 2.40.2 | — |
| Product | Affected | Fixed in |
|---|---|---|
| github.com/docker/compose/v2 (Go) | from 2.34.0, before 2.40.2 | 2.40.2 |
Package versions from GHSA-gv8h-7v7w-r22q.
Exploitation
Not in the CISA Known Exploited Vulnerabilities catalog as of 4 Nov 2026.
Severity
| CVSS 4.0 | 8.9 highCVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:XScored by the CNA ([email protected]) |
|---|---|
| Weakness | CWE-22 |
References
- CVE-2025-62725 on NVD
- CVE-2025-62725 on OSV
- https://github.com/docker/compose/commit/69bcb962bfb2ea53b41aa925333d356b577d6176
- https://github.com/docker/compose/security/advisories/GHSA-gv8h-7v7w-r22q
Sources
Exploitation status from the CISA Known Exploited Vulnerabilities catalog. EPSS scores from FIRST. Descriptions, severity and references from the National Vulnerability Database. Open-source package versions from OSV (CC-BY 4.0). Text is shown as each source states it; Stackurity does not edit it. Check the vendor's advisory before acting.
This product uses data from the NVD API but is not endorsed or certified by the NVD.