Skip to content

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

HighCVSS 8.9 EPSS 16.5%
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.

PackageAffectedFixed inStatus
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

ProductAffected versionsFixed 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