Advisory Database
  • Advisories
  • Dependency Scanning
  1. golang
  2. ›
  3. github.com/docker/compose/v2
  4. ›
  5. CVE-2025-62725

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

October 27, 2025 (updated November 27, 2025)

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.

References

  • github.com/advisories/GHSA-gv8h-7v7w-r22q
  • github.com/docker/compose
  • github.com/docker/compose/commit/69bcb962bfb2ea53b41aa925333d356b577d6176
  • github.com/docker/compose/security/advisories/GHSA-gv8h-7v7w-r22q
  • nvd.nist.gov/vuln/detail/CVE-2025-62725

Code Behaviors & Features

Detect and mitigate CVE-2025-62725 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 2.34.0 before 2.40.2

Fixed versions

  • 2.40.2

Solution

Upgrade to version 2.40.2 or above.

Impact 9.6 CRITICAL

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-20: Improper Input Validation
  • CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Source file

go/github.com/docker/compose/v2/CVE-2025-62725.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 06 Dec 2025 12:18:23 +0000.