Skip to content
Fencer Vulns
high 8.9

CVE-2025-62725 in the critical feed json

Docker Compose Vulnerable to Path Traversal via OCI Artifact Layer Annotations

published 2025-10-27 12 mo ago modified 2026-10-08 32 d ago also EUVD-2025-36357 , GHSA-gv8h-7v7w-r22q , GO-2025-4077

cvss
8.9
version 4.0, CNA
cisa kev
Not listed
not in CISA's catalog
epss
15.8%
EPSS 15.8% chance of exploitation in 30 days, percentile 96%
public exploits
0
none known

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.

Patch / fix

  • go github.com/docker/compose/v2 2.40.2
  • docker compose 2.40.2
  • docker-compose SLES 16.0, Linux Micro 6.2, SLES for SAP applications 16.0 2.33.1-160000.4.1
  • docker-compose Linux Micro 6.0 2.33.1-4.1
  • docker-compose Linux Micro 6.1 2.33.1-slfo.1.1_2.1

suse advisories SUSE-SU-2026:20949-1SUSE-SU-2026:20976-1SUSE-SU-2026:20871-1SUSE-SU-2026:20656-1

  • govulncheck-vulndb openSUSE Leap 16.0 0.0.20260723T184607-160000.1.1
  • docker-compose openSUSE Leap 16.0 2.33.1-160000.4.1
  • govulncheck-vulndb openSUSE Tumbleweed 0.0.20251105T184115-1.1

opensuse advisories openSUSE-SU-2026:21483-1openSUSE-SU-2026:20438-1openSUSE-SU-2025:15710-1

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2025-62725 updated cvss 8.0

docker-compose: Docker Compose Vulnerable to Path Traversal via OCI Artifact Layer Annotations

  • Red Hat Developer Hub 1 rhdh/rhdh-hub-rhel9
    not affected: component not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

CISA SSVC

Exploitation
none
Automatable
no
Technical impact
total
Assessed
12 mo ago

Exploit prediction

15.76% chance of exploitation in the next 30 days, higher than 96% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
CNA 4.0 8.9 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
CNA 4.0 8.9 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

Affected packages

ecosystem package affected fixed in
go github.com/docker/compose/v2
>=2.34.0, <2.40.2
<2.40.2
2.40.2
go github.com/docker/compose
all versions
no fix listed

Affected products

  • docker compose

Classification

Weakness
  • CWE-22 Improper Limitation of a Pathname to a Restricted Directory
  • CWE-20 Improper Input Validation

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.

CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.