{"id":"CVE-2025-62725","published":"2025-10-27T20:37:32Z","modified":"2025-10-28T14:47:42Z","title":"Docker Compose Vulnerable to Path Traversal via OCI Artifact Layer Annotations","vendor":"docker","product":"compose","tier":"tail","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.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.9,"severity":"HIGH","version":"4.0","vector":"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","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00805,"percentile":0.53581,"provenance":"source"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"references":[{"url":"https://github.com/docker/compose/security/advisories/GHSA-gv8h-7v7w-r22q","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/docker/compose/commit/69bcb962bfb2ea53b41aa925333d356b577d6176","tags":["x_refsource_MISC"]}],"priority":{"score":16.9,"factors":[{"name":"EPSS percentile","points":10.72},{"name":"CVSS severity","points":6.23}]},"vendorSlug":"docker","affectedVersions":[{"vendor":"docker","product":"compose","versions":["< 2.40.2"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2025-10-28T14:47:30.993646Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Go","package":"github.com/docker/compose/v2","vulnerableRanges":[">=2.34.0, <2.40.2","<2.40.2"],"patched":["2.40.2"],"from":["GHSA-gv8h-7v7w-r22q","GO-2025-4077"],"provenance":"source"},{"ecosystem":"Go","package":"github.com/docker/compose","vulnerableRanges":["all versions"],"patched":[],"from":["GO-2025-4077"],"provenance":"source"}],"summary":{"text":"Docker Compose contains a path traversal flaw in how it handles remote OCI compose artifacts: when a layer carries the com.docker.compose.extends or com.docker.compose.envfile annotations, Compose joins attacker-supplied file path values with its local cache directory and writes files there. An attacker who can supply a crafted remote OCI compose artifact can escape the cache directory and overwrite arbitrary files on the host running docker compose, with user interaction required and even read-only commands such as docker compose config or docker compose ps sufficient to trigger the write.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-21T07:23:35Z"},"euvd":{"id":"EUVD-2025-36357","exploited":false,"provenance":"source"}}