Disclosure summary
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.
Source-reported weakness categories
CWE-22
Source-specific records & product guidance
Sources retain their own attribution and scoring. Follow the original record to confirm affected versions, fixed releases, and configuration conditions.
NIST National Vulnerability Database · NVD-CVE-2025-62725
Open original source · Updated Oct 08, 2026
Only CPE matches marked vulnerable=true are indexed. AND/OR platform conditions must be checked in the original NVD record.
Microsoft Security Updates (CVRF) · 2025-Oct
Open original source · Updated Aug 07, 2026
Docker Compose Vulnerable to Path Traversal via OCI Artifact Layer Annotations
Maximum of vendor-reported product scores; products and fixed builds are associations, not a universal affected-version statement.
| Vendor | Product / association | Version / bounds |
|---|---|---|
| Microsoft update guide | azl3 docker-compose 2.27.0-12 on Azure Linux 3.0 | (MSRC status code 3) |
Original records & references
PUBLISHED 2025-10-27T17:15:38-04:00
MODIFIED 2026-10-08T07:10:00-04:00
INGESTED 2026-10-08T12:35:13-04:00