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

- Severity: High 8.9 (CVSS:4.0, scored by GitHub_M) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 16.5%, higher than 97% of CVEs (2026-12-01)
- Published: 2025-10-27T20:19:34.000Z
- Modified: 2026-10-08T11:10:00.250Z
- Also known as: GHSA-gv8h-7v7w-r22q, GO-2025-4077
- Weaknesses: CWE-20, CWE-22
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- docker compose: < 2.40.2
- github.com/docker/compose/v2 (Go): from 2.34.0 before 2.40.2; before 2.40.2
- github.com/docker/compose (Go): all versions

## Every score

- GitHub_M: CVSS:4.0 8.9 High `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`
- GitHub: CVSS:4.0 High `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`

## References

- <https://github.com/docker/compose/security/advisories/GHSA-gv8h-7v7w-r22q> (advisory, web)
- <https://github.com/docker/compose/commit/69bcb962bfb2ea53b41aa925333d356b577d6176> (fix, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2025-62725> (advisory)
- <https://github.com/docker/compose> (package)

## Sources

- CVE List: [CVE-2025-62725](https://www.cve.org/CVERecord?id=CVE-2025-62725), CVE Terms of Use, modified 2025-10-28
- GitHub Advisory Database: [GHSA-gv8h-7v7w-r22q](https://github.com/advisories/GHSA-gv8h-7v7w-r22q), CC-BY-4.0, modified 2025-11-27
- Go Vulnerability Database: [GO-2025-4077](https://pkg.go.dev/vuln/GO-2025-4077), CC-BY-4.0, modified 2026-03-03
- NVD: [CVE-2025-62725](https://nvd.nist.gov/vuln/detail/CVE-2025-62725), Public domain, modified 2026-10-08

---

Page: https://cve.day/CVE-2025-62725 · Whole record: https://cve.day/CVE-2025-62725.json · Rebuilt by cve.day 2026-11-25T22:59:06.905Z
