CVE-2025-62725 Docker Compose Vulnerable to Path Traversal via OCI Artifact Layer Annotations
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- No known exploitation · automatable: no · technical impact: total
- Technology
- DockerUbuntuDebian
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.
Upgrade path
6 packages: 0 fixed, 1 partially fixed, 4 with no fix yet.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| azure linux docker-compose(Azure Linux 3.0) | All versions | No fix listed | No fix yet |
| debian/docker-compose(Debian 14) | = 2.26.1-4; = 2.32.4-1; = 2.32.4-2; = 2.32.4-3 +1 more | No fix listed | No fix yet |
| ubuntu/docker-compose(Ubuntu 22.04) | All versions | No fix listed | No fix yet |
| ubuntu/docker-compose(Ubuntu 24.04) | All versions | No fix listed | No fix yet |
| docker github.com/docker/compose/v2(Go) | < 2.40.2; >= 2.34.0, < 2.40.2; All versions | 2.40.2 | Partially fixed |
| docker github.com/docker/compose/v2 | = < 2.40.2 | No fix listed | Versions listed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| docker github.com/docker/compose/v2(Go) | >= 2.34.0, < 2.40.2 | 2.40.2 |
| docker github.com/docker/compose/v2(Go) | All versions | No fix listed |
| docker github.com/docker/compose/v2(Go) | < 2.40.2 | 2.40.2 |
| azure linux docker-compose(Azure Linux:3.0) | All versions | No fix listed |
| debian/docker-compose(Debian:14) | All versions | No fix listed |
| debian/docker-compose(Debian:14) | = 2.26.1-4 | No fix listed |
| debian/docker-compose(Debian:14) | = 2.32.4-1 | No fix listed |
| debian/docker-compose(Debian:14) | = 2.32.4-2 | No fix listed |
| debian/docker-compose(Debian:14) | = 2.32.4-3 | No fix listed |
| docker github.com/docker/compose/v2 | = < 2.40.2 | No fix listed |
| ubuntu/docker-compose(Ubuntu:22.04) | All versions | No fix listed |
| ubuntu/docker-compose(Ubuntu:24.04) | All versions | No fix listed |
References
- https://github.com/docker/compose/security/advisories/GHSA-gv8h-7v7w-r22q vendor-advisory
- nvd.nist.gov third-party-advisory vendor-advisory
- https://github.com/docker/compose/commit/69bcb962bfb2ea53b41aa925333d356b577d6176 patch
- github.com product
- MSRC Security Update Guide vendor-advisory
- Debian Security Tracker CVE-2025-62725 vendor-advisory
- github.com
- Ubuntu CVE tracker vendor-advisory
- www.cve.org