CVE-2025-62725 Details
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.
A path traversal vulnerability has been identified in Docker Compose versions prior to 2.40.2. This issue arises because Docker Compose trusts the path information in remote OCI compose artifacts. When a layer includes certain annotations, Compose concatenates the attacker-supplied values with its local cache directory, potentially allowing an attacker to escape the cache directory and overwrite arbitrary files on the host machine. This vulnerability can be exploited even when using read-only commands such as 'docker compose config' or 'docker compose ps'.
Users can upgrade to Docker Compose version 2.40.2 or later to address this vulnerability.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Oct 27, 2025CISA-ADP
Assessed Oct 28, 2025References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/docker/compose/commit/69bcb962bfb2ea53b41aa925333d356b577d6176 | [email protected] | Source CodeVendor |
| https://github.com/docker/compose/security/advisories/GHSA-gv8h-7v7w-r22q | [email protected] | AdvisoryRemedyVendor |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-22 | Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| Docker Compose | All versions |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Oct 8, 2026 | CVE Translated | [email protected] |
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Oct 27, 2025 | New CVE Received | [email protected] |
Volerion