p PatchFirst

CVE-2025-62725

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

CVSS 8.9 · High · EPSS 16.5%

Compare with your installed version

Affected products and known fixed versions are public information. Compare them with your installed version.

Check the installed version:

dpkg-query -W -f='${source:Package} ${binary:Package} ${Version}\n' | awk '$1=="docker-compose"'

Assess your server’s risks

The free check gives you a rating and a risk summary by technology stack, without signing up. It does not answer whether this particular vulnerability affects you.

Monitoring matches public information against your servers’ software. Detailed findings for your servers include the order of updates.

curl -fsSL https://patchfirst.dev/check.sh | sh
Check your server for free →

Channels carry general technology news; monitoring reports new findings on your servers in your dashboard, through browser notifications, in Telegram or via a webhook.

This page contains facts from public vulnerability sources. Check the original advisory before updating.

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.

Published
Updated

Fixes in distributions

Stack: system

Affected products and versions

  • compose

    Versions
    • < 2.40.2: Affected

    No fix published

  • docker-compose Ubuntu 16.04 LTS

    Versions
    • 1.3.1-1
    • 1.5.1-1
    • 1.5.2-1
    • 1.8.0-2~16.04.1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • docker-compose Ubuntu 18.04 LTS

    Versions
    • 1.8.0-2
    • 1.17.0-1
    • 1.17.1-1
    • 1.17.1-2
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • docker-compose Ubuntu 20.04 LTS

    Versions
    • 1.21.0-3
    • 1.25.0-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • docker-compose Ubuntu 22.04 LTS

    Versions
    • 1.27.4-1
    • 1.27.4-2
    • 1.27.4-3
    • 1.29.2-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • docker-compose Ubuntu 24.04 LTS

    Versions
    • 1.29.2-6
    • 1.29.2-6ubuntu1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

Original sources

Check your server →