Skip to content
FlawDB
Sign in
Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

CVE-2025-62725

HIGH 8.9EPSS 54%

Docker Compose Vulnerable to Path Traversal via OCI Artifact Layer Annotations

Also known as GHSA-gv8h-7v7w-r22q, GO-2025-4077

Mitigation

  • Upgrade github.com/docker/compose/v2 to 2.40.2 or later.

Who should check

  • Projects that depend on Go package github.com/docker/compose/v2 (>= 2.34.0, < 2.40.2)
  • Projects that depend on Go package github.com/docker/compose
  • Anyone running docker compose < 2.40.2

Vulnerability facts

Affected
github.com/docker/compose/v2 >= 2.34.0, < 2.40.2; github.com/docker/compose
Fixed in
2.40.2
Exploited in the wild
Not in CISA KEV
Public exploit / PoC
None known
Remote exploitation
Remote, no login needed
CVSS
8.9 (v4.0, CNA)CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:H/VI:H/VA:H/SC:H/SI:H/SA:HOpen in CVSS calculator
Show all 11 CVSS metrics
  • Attack vector: Network
  • Attack complexity: Low
  • Attack requirements: Present
  • Privileges required: None
  • User interaction: Active
  • Confidentiality impact: High
  • Integrity impact: High
  • Availability impact: High
  • Confidentiality impact on other systems: High
  • Integrity impact on other systems: High
  • Availability impact on other systems: High
EPSS
0.80% chance of exploitation in 30 days (percentile 54, 2026-11-26)
CWE
CWE-22
Published
Modified

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. 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.

Affected and fixed versions

Package / productAffectedFixedSource
Go github.com/docker/compose/v2>= 2.34.0, < 2.40.22.40.2osv
Go github.com/docker/compose——osv
docker compose< 2.40.2—cvelist

Check your systems with an agent

Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.

Check whether anything I run is affected by CVE-2025-62725. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-62725.md
Affected: github.com/docker/compose/v2 >= 2.34.0, < 2.40.2; github.com/docker/compose
Fixed in: 2.40.2

Steps:
1. Search this machine and project for github.com/docker/compose/v2 (Go), github.com/docker/compose (Go), docker compose: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.

References

FAQ

Is CVE-2025-62725 being exploited?

There is no confirmed exploitation: CVE-2025-62725 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.80% chance of exploitation in the next 30 days (as of 2026-11-26).

How serious is CVE-2025-62725?

High: CVSS 8.9 (v4.0, scored by CNA). Remote, no login needed. A user has to take an action, such as opening a link, for the attack to work.

Which versions are affected by CVE-2025-62725?

github.com/docker/compose/v2 >= 2.34.0, < 2.40.2; github.com/docker/compose.

Is there a fix for CVE-2025-62725?

Yes. Fixed in 2.40.2. Upgrade github.com/docker/compose/v2 to 2.40.2 or later.

How do I check if I'm affected by CVE-2025-62725?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

Sponsors