Stackurity Start free trial

CVEs / CVE-2025-62725

CVE-2025-62725: docker compose vulnerability

Are you affected? Check your servers with Stackurity: it lists the software on each server and the vulnerabilities to fix first.

Check your servers with Stackurity Already using Stackurity? Search for CVE-2025-62725

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.

The CVE record, via NVD · published 27 Oct 2025 · NVD status: Deferred

Affected and fixed versions

As stated by the CVE record (from the CNA)
ProductAffectedFixed in
docker compose< 2.40.2—
As stated by OSV
ProductAffectedFixed in
github.com/docker/compose/v2 (Go)from 2.34.0, before 2.40.22.40.2

Package versions from GHSA-gv8h-7v7w-r22q.

Exploitation

Not in the CISA Known Exploited Vulnerabilities catalog as of 4 Nov 2026.

Severity

CVSS 4.08.9 high
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
Scored by the CNA ([email protected])
WeaknessCWE-22

References

Sources

Exploitation status from the CISA Known Exploited Vulnerabilities catalog. EPSS scores from FIRST. Descriptions, severity and references from the National Vulnerability Database. Open-source package versions from OSV (CC-BY 4.0). Text is shown as each source states it; Stackurity does not edit it. Check the vendor's advisory before acting.

This product uses data from the NVD API but is not endorsed or certified by the NVD.