CVSS 4.0
8.9 highCVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:H/VI:H/VA:H/SC:H/SI:H/SA:HHigh (8.9) in docker compose. EPSS 17% estimated probability of exploitation activity in the next 30 days. Fixed in github.com/docker/compose/v2 2.40.2.
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:H/VI:H/VA:H/SC:H/SI:H/SA:Hgithub.com/docker/compose/v2 (Go): fixed in 2.40.2Explain CVE-2025-62725 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2025-62725?via=ask-ai-copy and https://cve.bz/cve/CVE-2025-62725?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2025-62725 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.
From the CNA's record in the CVE List.
| Product | Affected |
|---|---|
| docker compose | < 2.40.2 |
| Advisory | Ecosystem | Package | Affected | Fixed in |
|---|---|---|---|---|
| GHSA-gv8h-7v7w-r22q | Go | github.com/docker/compose/v2 | >=2.34.0 <2.40.2 | 2.40.2 |
| GO-2025-4077 | Go | github.com/docker/compose | all versions | no fix published |
| GO-2025-4077 | Go | github.com/docker/compose/v2 | <2.40.2 | 2.40.2 |
| Distribution | Release | Package | Fixed in | Advisory |
|---|---|---|---|---|
| Ubuntu | 16.04:LTS, 18.04:LTS, 20.04:LTS and 2 more | docker-compose | no fix listed | UBUNTU-CVE-2025-62725 |
| SUSE | Linux Enterprise Server 16.0, Linux Enterprise Server for SAP applications 16.0 | docker-compose | 2.33.1-160000.4.1 | SUSE-SU-2026:20976-1 |
| SUSE | Linux Micro 6.0 | docker-compose | 2.33.1-4.1 | SUSE-SU-2026:20871-1 |
| SUSE | Linux Micro 6.1 | docker-compose | 2.33.1-slfo.1.1_2.1 | SUSE-SU-2026:20656-1 |
| SUSE | Linux Micro 6.2 | docker-compose | 2.33.1-160000.4.1 | SUSE-SU-2026:20949-1 |
| openSUSE | Leap 16.0 | docker-compose | 2.33.1-160000.4.1 | openSUSE-SU-2026:20438-1 |
| openSUSE | Leap 16.0 | govulncheck-vulndb | 0.0.20260723T184607-160000.1.1 | openSUSE-SU-2026:21483-1 |
| openSUSE | Tumbleweed | govulncheck-vulndb | 0.0.20251105T184115-1.1 | openSUSE-SU-2025:15710-1 |
From the distributions' data via OSV.dev: Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; SUSE security data, CC BY 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Ubuntu · SUSE · openSUSE.
Red Hat rates this Important.
This vulnerability is considered Important rather than Moderate because it enables an attacker to perform arbitrary file overwrite on the host system through a simple path traversal attack vector, even when the user executes seemingly safe, read-only Docker Compose commands such as docker compose ps or docker compose config. The issue arises from improper validation of attacker-controlled OCI annotation values, allowing malicious paths to break out of the intended cache directory. While user interaction is required, the potential impact on system confidentiality, integrity, and availability is significant—modified configuration files, environment files, or scripts could lead to privilege escalation or further code execution.
No mitigation is currently available that meets Red Hat Product Security’s standards for usability, deployment, applicability, or stability.
The risk can be reduced by avoiding the use of untrusted or third-party OCI compose artifacts and only sourcing artifacts from verified and trusted registries. Users should also restrict network access to prevent accidental retrieval of malicious remote artifacts and run Docker Compose commands only within controlled and isolated environments.
| Product | Package | State | Advisory |
|---|---|---|---|
| Red Hat Developer Hub 1 | rhdh/rhdh-hub-rhel9 | Not affected |
Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2025-62725.
The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.