Loading...
Skip to main content

CVE-2025-62725 — Vulnerability in github.com/docker/compose/v2 —...

HIGH

Docker Compose Vulnerable to Path Traversal via OCI Artifact Layer Annotations

Published October 27, 2025Updated November 27, 2025Source: osv

Summary

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

Advisory Timeline

  • First published October 27, 2025 (350 days ago).
  • Last revised November 27, 2025 — 31 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Go
Update github.com/docker/compose/v2 to 2.40.2 or later
go get github.com/docker/compose/v2@v2.40.2

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (1)

Affects 1 ecosystem: go (1).

PackageEcosystemAffectedFixed In
github.com/docker/compose/v2
go
All versions2.40.2

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

  • CWE-20
    Improper Input ValidationMITRE
  • CWE-22
    Path TraversalMITRE

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 8.8 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
A
Scope
—
Confidentiality
—
Integrity
—
Availability
—

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

Frequently Asked Questions

What is CVE-2025-62725?
Docker Compose Vulnerable to Path Traversal via OCI Artifact Layer Annotations This vulnerability has been assigned a severity rating of HIGH (CVSS score: 8.8/10).
How do I check if my project is affected by CVE-2025-62725?
CVE-2025-62725 affects github.com/docker/compose/v2. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2025-62725 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
8.8

High exploitability or significant impact. Prioritize remediation within days.

Also Known As

GHSA-gv8h-7v7w-r22q
GO-2025-4077

Related CVEs

  • CVE-2024-41110
    CRITICAL

    Authz zero length regression

  • CVE-2019-14271
    CRITICAL

    Moby Docker cp broken with debian containers

  • CVE-2026-107809
    HIGH

    Nginx-UI AuthRequired token cookie fallback enables CSRF against management APIs

  • CVE-2025-64443
    HIGH

    Docker MCP Plugin and Docker MCP Gateway have DNS Rebinding vulnerability when running in sse or streaming mode

  • CVE-2026-107813
    HIGH

    Nginx UI: Incomplete fix of CVE-2026-84315 - the api/cluster router was not - wrapped in RequireSecureSession, so those sensitive mutations run without OTP step-up

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies