Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2025-62725: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in docker compose

0
High
VulnerabilityCVE-2025-62725cvecve-2025-62725cwe-22
Published: Mon Oct 27 2025 (10/27/2025, 20:37:32 UTC)
Source: CVE Database V5
Vendor/Project: docker
Product: compose

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.

AI-Powered Analysis

AILast updated: 11/04/2025, 03:21:16 UTC

Technical Analysis

CVE-2025-62725 is a path traversal vulnerability classified under CWE-22 that affects Docker Compose versions earlier than 2.40.2. Docker Compose processes remote OCI compose artifacts that may include annotations such as com.docker.compose.extends or com.docker.compose.envfile. When these annotations are present, Docker Compose concatenates attacker-controlled path values from com.docker.compose.file or com.docker.compose.envfile with its local cache directory path and writes files accordingly. Due to insufficient validation and improper limitation of these pathname inputs, an attacker can craft malicious OCI compose artifacts that cause Docker Compose to write files outside the intended cache directory. This allows overwriting arbitrary files on the host system, potentially leading to code execution, privilege escalation, or system compromise. Notably, exploitation can occur even when users run read-only commands like docker compose config or docker compose ps, increasing the attack surface. The vulnerability affects all platforms and workflows that resolve remote OCI compose artifacts, including Docker Desktop, standalone Compose binaries on Linux, CI/CD pipelines, and cloud development environments. The CVSS 4.0 score is 8.9 (high), reflecting network attack vector, low attack complexity, no privileges required, but requiring user interaction, and high impact on confidentiality, integrity, and availability. No known exploits have been reported yet, but the vulnerability is critical enough to warrant immediate remediation by upgrading to Docker Compose 2.40.2 or later.

Potential Impact

For European organizations, this vulnerability poses a significant risk to the security of containerized development and deployment environments. Since Docker Compose is widely used for defining and running multi-container Docker applications, exploitation could allow attackers to overwrite critical system or application files, leading to unauthorized code execution or disruption of services. This could compromise sensitive data confidentiality, integrity of application deployments, and availability of critical services. Organizations relying on CI/CD pipelines or cloud-based development environments that utilize Docker Compose are particularly vulnerable, as attackers could leverage this flaw to inject malicious configurations or backdoors. The ability to exploit this vulnerability without authentication and even during read-only operations increases the risk of insider threats or supply chain attacks via malicious OCI artifacts. This could lead to widespread operational disruptions, data breaches, and compliance violations under European data protection regulations such as GDPR.

Mitigation Recommendations

European organizations should immediately upgrade all Docker Compose installations to version 2.40.2 or later, where this vulnerability is fixed. Additionally, organizations should implement strict validation and integrity checks on all OCI compose artifacts before use, including verifying signatures and provenance to prevent malicious inputs. Restrict network access to trusted artifact registries and limit the ability to pull remote OCI artifacts to authorized users and systems. Employ runtime monitoring and file integrity monitoring on systems running Docker Compose to detect unauthorized file modifications. In CI/CD environments, enforce artifact scanning and sandbox testing to detect malicious path traversal attempts. Educate developers and DevOps teams about the risks of using untrusted compose artifacts and the importance of applying security patches promptly. Finally, consider isolating Docker Compose execution environments with least privilege principles and container runtime security controls to limit the impact of potential exploitation.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
GitHub_M
Date Reserved
2025-10-20T19:41:22.742Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 68ffdbe2ba6dffc5e20d7f34

Added to database: 10/27/2025, 8:53:54 PM

Last enriched: 11/4/2025, 3:21:16 AM

Last updated: 12/12/2025, 8:12:30 AM

Views: 771

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats