CVEfocus › CVE database › CVE-2025-62725

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

CVSS 8.9 HighEPSS 0.8% (higher than 54% of CVEs)Published 2025-10-27Updated 2025-10-28Assigner: GitHub_M

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.

CWE-22

What to do

Fixed builds are available from Go: see the table below for the fixed version per release.

Go, Ubuntu have not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

1Fixed
4Fix pending
2Under investigation

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 24.04docker-composeUnder investigationUBUNTU-CVE-2025-62725
Ubuntu 22.04docker-composeUnder investigationUBUNTU-CVE-2025-62725
Ubuntu 20.04docker-composeFix pendingUBUNTU-CVE-2025-62725
Ubuntu 18.04docker-composeFix pendingUBUNTU-CVE-2025-62725
Ubuntu 16.04docker-composeFix pendingUBUNTU-CVE-2025-62725
Go librarygithub.com/docker/composeFix pendingGO-2025-4077
Go librarygithub.com/docker/compose/v2Fixed2.40.2GHSA-gv8h-7v7w-r22q

What the vendor says

As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.