Read the docs
TI-2025-38915 Aliases CVE-2025-62725GHSA-gv8h-7v7w-r22q

Docker Compose Vulnerable to Path Traversal via OCI Artifact Layer Annotations

Priority MEDIUM 57CWE-22Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
Active
Attack complexity
Low
Attack requirements
Present
Impact type
—
Confidentiality · integrity · availability
High · High · High
Fix status
Fixed

Attack profile from CVSS 4.0 · CNA. Fix status from CNA and GitHub.

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.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.15764 96th percentileScored 2026-11-07
Fix Fixed compose (docker): 2.40.2github.com/docker/compose/v2 (Go): 2.40.2

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
No
Technical impact
Total

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
Dockercomposebefore 2.40.22.40.2Patch availableCNA
—github.com/docker/compose/v2 (Go)2.34.0 to before 2.40.22.40.2Patch availableGHSA-gv8h-7v7w-r22q
  • compose VendorDocker Affected before 2.40.2 Fixed in 2.40.2 Patch available CNA
  • github.com/docker/compose/v2 (Go) Vendor— Affected 2.34.0 to before 2.40.2 Fixed in 2.40.2 Patch available GHSA-gv8h-7v7w-r22q

Remediation

  • Fix · CNA compose (docker) Fixed in 2.40.2
  • Fix · GHSA-gv8h-7v7w-r22q github.com/docker/compose/v2 (Go) Fixed in 2.40.2 Advisory →

Vendor assessments

Red Hat

Red Hat rating: Important. Red Hat's page for this CVE →

Not affected: 1 product
  • Red Hat Developer Hub 1

Timeline

  1. 2026-10-02 Threatist record created from CVE-2025-62725
  2. 2026-10-03 Alias added: GHSA-gv8h-7v7w-r22q
  3. 2026-10-27 Affected versions changed · Red Hat

References

  • TI-2019-11833 Docker Desktop Community Edition before 2.1.0.1 allows local users to gain privileges by… KEVCVSS 3.1HIGH 7.8
  • TI-2019-04061 runc through 1.0-rc6, as used in Docker before 18.09.2 and other products, allows… CVSS 3.1HIGH 8.6
  • TI-2025-08316 Docker Desktop allows unauthenticated access to Docker Engine API from containers CVSS 4.0CRITICAL 9.3
  • TI-2025-02823 Elevation of Privilege in Docker Desktop for Windows during Upgrade due to Insecure Directory Deletion CVSS 4.0HIGH 7.3
  • TI-2026-14229 Tar extraction in moby/go-archive can write outside the destination directory via link following CVSS 4.0HIGH 7.1
  • TI-2023-21271 Docker Machine through 0.16.2 allows an attacker, who has control of a worker node, to… CVSS 3.1MEDIUM 6.5
See all 132 →

Sources