CVE-2025-62725

NameCVE-2025-62725
DescriptionDocker 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.
SourceCVE (at NVD; CERT, ENISA, LWN, oss-sec, fulldisc, Debian ELTS, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more)

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
docker-compose (PTS)bullseye1.25.0-1fixed
bookworm1.29.2-3fixed
trixie2.26.1-4fixed
forky, sid2.32.4-3fixed

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
docker-composesource(unstable)(not affected)

Notes

- docker-compose <not-affected> (Vulnerable code introduced later, cf. bug #1119298)
https://github.com/docker/compose/security/advisories/GHSA-gv8h-7v7w-r22q
Introduced in: https://github.com/docker/compose/commit/66a47169d51ef4be5e230dda982661248b20f60a (v2.34.0)
Introduced in: https://github.com/docker/compose/commit/840288895e673fcccd56a7830dee30d8a75523ef (v2.33.0)
Fixed by: https://github.com/docker/compose/commit/69bcb962bfb2ea53b41aa925333d356b577d6176 (v2.40.2)

Search for package or bug name: Reporting problems