Skip to main content
VulnerabilityPublished Updated

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

Affects github.com/docker/compose/v2Source GCVE Database

0
Compare
Authoritative record:CVE-2025-62725· High 8.9

Not known to be exploited · CVSS 8.9 High : upgrade to 2.40.2 soon.

Data as of 19 Nov 2026, 02:13 UTC

CVSS 4.0 base score
8.9High
How severe the flaw is on the 0–10 CVSS scale.
Patch
Available – fixed in 2.40.2
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

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 27 Oct 2025

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 18 Nov 2026.

What to do

Upgrade github.com/docker/compose/v2 to 2.40.2.

Affected software

ProductAffectedFixed in
Gogithub.com/docker/compose/v2Affected
  • >=2.34.0 <2.40.2
Fixed in
  • 2.40.2

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

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. ### Impact 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. ### Patches v2.40.2 ### Workarounds NA

References

Community reviews

Loading reviews…