CVE-2025-62725: Docker Compose Vulnerable to Path Traversal via OCI Artifact Layer Annotations

Published Oct 27, 2025
·
Updated

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.

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

Patches v2.40.2

Workarounds NA

Other sources

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.

MITRE

Affected Software

1 affected componentFixes available
go/github.com/docker/compose/v2<2.40.2
2.40.2

Event History

Oct 27, 2025
Advisory Published
via GitHub·08:19 PM
Data Sourced
via GitHub·08:19 PM
DescriptionWeaknessAffected Software
CVE Published
via MITRE·08:37 PM
Data Sourced
via MITRE·08:37 PM
DescriptionWeakness
Data Sourced
via NVD·09:15 PM
DescriptionSeverityWeakness
Oct 30, 2025
News Published
via The Register·04:27 PM
News Published
via The Register·04:30 PM
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2025-62725?

CVE-2025-62725 has a medium severity due to its potential to allow an attacker to manipulate Docker Compose configurations.

2

How do I fix CVE-2025-62725?

To fix CVE-2025-62725, upgrade Docker Compose to version 2.40.2 or later to mitigate the vulnerability.

3

What type of vulnerability is CVE-2025-62725?

CVE-2025-62725 is a path manipulation vulnerability in Docker Compose that exploits user-supplied values in OCI compose artifacts.

4

Which versions of Docker Compose are affected by CVE-2025-62725?

Docker Compose versions prior to 2.40.2 are affected by CVE-2025-62725.

5

What are the consequences of exploiting CVE-2025-62725?

Exploitation of CVE-2025-62725 could lead to unauthorized modifications of Docker Compose configurations, potentially compromising the application environment.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203