# CVE-2025-62725: Docker Compose Vulnerable to Path Traversal via OCI Artifact Layer Annotations

- Priority: **Routine**
- Reason: Not severe (CVSS 8.9, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2025-10-27 · Modified: 2025-10-28
- Aliases: SUSE-SU-2026:20871-1, UBUNTU-CVE-2025-62725, DEBIAN-CVE-2025-62725, GHSA-gv8h-7v7w-r22q, GO-2025-4077
- Record: https://cvemate.com/vulnerability/CVE-2025-62725 · JSON: https://cvemate.com/vulnerability/CVE-2025-62725/json

## Description

```text
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.
```

## Signals

- CVSS: 8.9 high (v4.0, CVE.org) 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
- EPSS: 16.513%, percentile 97.087%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- debian docker-compose (Debian): All versions (No fix recorded)
- ubuntu docker-compose (Ubuntu): All versions (No fix recorded)
- docker compose: \< 2.40.2
- github.com/docker compose (Go): All versions (No fix recorded)
- github.com/docker/compose v2 (Go): ≥ 2.34.0, \< 2.40.2 \| \< 2.40.2
- suse docker-compose&distro=SUSE Linux Micro 6.0 (SUSE Linux Enterprise): \< 2.33.1-4.1

## References

- <https://github.com/docker/compose/security/advisories/GHSA-gv8h-7v7w-r22q>
- <https://github.com/docker/compose/commit/69bcb962bfb2ea53b41aa925333d356b577d6176>
- <https://www.suse.com/support/update/announcement/2026/suse-su-202620871-1/>
- <https://bugzilla.suse.com/1252752>
- <https://www.suse.com/security/cve/CVE-2025-62725>
- <https://ubuntu.com/security/CVE-2025-62725>
- <https://www.cve.org/CVERecord?id=CVE-2025-62725>
- <https://security-tracker.debian.org/tracker/CVE-2025-62725>
- <https://nvd.nist.gov/vuln/detail/CVE-2025-62725>
- <https://github.com/docker/compose>

---

Data as of 2026-12-05T05:11:01.586Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
