CVE-2025-62725docker compose
High 8.9 No auth needed
Follow: this CVE · docker · docker compose We alert you by email or Slack (account required).
- Priority
- 68
- CVSS 4.0
- 8.9
- EPSS
- —
- Auth required
- No
- Published
- Oct 27, 2025
- Updated
- Oct 8, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-22
- SSVC (CISA)
- Exploitation: none · Automatable: no · Technical impact: total
- Vector
CVSS: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:X
What happens
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.
What to do
- Apply the vendor's security update for compose.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| Go | github.com/docker/compose |
all |
no fixed version | — |
| Go | github.com/docker/compose/v2 |
≥ 2.34.0 < 2.40.2 |
2.40.2 |
go get github.com/docker/compose/v2@v2.40.2 |
| Go | github.com/docker/compose/v2 |
< 2.40.2 |
2.40.2 |
go get github.com/docker/compose/v2@v2.40.2 |
Per OSV / GitHub Advisories (GO-2025-4077, GHSA-gv8h-7v7w-r22q). Check the version in your lockfile before upgrading.
Affected products
- docker · compose
As reported by the CNA that published the CVE. NVD has not added CPEs with versions yet.
Official advisories
- Security update for govulncheck-vulndb · SUSE · openSUSE-SU-2026:21483-1 · Jul 30, 2026 Critical
- Security update for docker-compose · SUSE · SUSE-SU-2026:20949-1 · Mar 27, 2026 High
- Security update for docker-compose · SUSE · SUSE-SU-2026:20976-1 · Mar 27, 2026 High
Also: SUSE (+3)
Vendor, CERT and distribution advisories that name this CVE. Original titles.
Official sources
References
Links published by the sources. Open them with care.