{"answers":{"affected":"4 open source packages ship an affected version, including github.com/docker/compose/v2 and github.com/docker/compose.","exploited":"There is no known exploitation of CVE-2025-62725 in the wild and no public exploit code.","fix":"Upgrade github.com/docker/compose/v2 to 2.40.2 or later.","what":"CVE-2025-62725 is a high-severity path traversal vulnerability in docker compose, published on 27 Oct 2025. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2025-62725 and fix it if it is affected.\n\nWhat it is: CVE-2025-62725 is a high-severity path traversal vulnerability in docker compose, published on 27 Oct 2025. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2025-62725 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- github.com/docker/compose/v2 (Go): affected all versions; fixed in 2.40.2\n- github.com/docker/compose/v2 (Go): affected from 2.34.0; fixed in 2.40.2\n- github.com/docker/compose/v2 (Go): affected from 2.34.0; fixed in 2.40.2\n- github.com/docker/compose (Go): affected all versions; no fix listed\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2025-62725/ (Markdown: https://insights.sbomify.com/CVE-2025-62725/index.md)","id":"CVE-2025-62725","markdown":"https://insights.sbomify.com/CVE-2025-62725/index.md","name":"CVE-2025-62725","record":{"aliases":["GHSA-gv8h-7v7w-r22q","GO-2025-4077","SUSE-SU-2026:20871-1","UBUNTU-CVE-2025-62725"],"analysis":{"component_type":"container_or_infrastructure","fix_type":"upgrade","impacts":["data_modify"],"network_reachable":"yes","non_default_config":false,"product_category":"Docker Compose","requires_auth":"none","summary":"Attackers can overwrite arbitrary files on the host by exploiting path traversal in Docker Compose's handling of remote OCI artifact annotations.","user_interaction":"required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":8.9,"severity":"high","source":"cna","vector":"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","version":"4.0"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"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.","ecosystems":["Go","SUSE:Linux Micro 6.0"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Docker Compose Vulnerable to Path Traversal via OCI Artifact Layer Annotations","id":"CVE-2025-62725","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Go","product":null,"products":[],"type":"path_traversal","year":"2025"},"n_packages":5,"n_references":2,"next":{"headline":"n8n Vulnerable to Remote Code Execution via Git Node Pre-Commit Hook","id":"CVE-2025-62726"},"packages":[{"ecosystem":"Go","fixed":[],"introduced":["0"],"last_affected":[],"package":"github.com/docker/compose","purl":"pkg:golang/github.com/docker/compose","source":"GO-2025-4077"},{"ecosystem":"Go","fixed":["2.40.2"],"introduced":["0"],"last_affected":[],"package":"github.com/docker/compose/v2","purl":"pkg:golang/github.com/docker/compose/v2","source":"GO-2025-4077"},{"ecosystem":"Go","fixed":["2.40.2"],"introduced":["2.34.0"],"last_affected":[],"package":"github.com/docker/compose/v2","purl":null,"source":"GHSA-gv8h-7v7w-r22q"},{"ecosystem":"Go","fixed":["2.40.2"],"introduced":["2.34.0"],"last_affected":[],"package":"github.com/docker/compose/v2","purl":"pkg:golang/github.com/docker/compose/v2","source":"GHSA-gv8h-7v7w-r22q"},{"ecosystem":"SUSE:Linux Micro 6.0","fixed":["2.33.1-4.1"],"introduced":["0"],"last_affected":[],"package":"docker-compose","purl":"pkg:rpm/suse/docker-compose\u0026distro=SUSE%20Linux%20Micro%206.0","source":"SUSE-SU-2026:20871-1"}],"prev":{"headline":"Open OnDemand allowlist bypass using symlinks in directory downloads (TOCTOU)","id":"CVE-2025-62724"},"products":["compose"],"published":"2025-10-27","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"Go Vulnerability Database","prefix":"GO"},{"class":"attribution","licence":"CC BY 4.0","name":"SUSE","prefix":"SUSE"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2025-10-28","vendors":["docker"]},"summary":"Attackers can overwrite arbitrary files on the host by exploiting path traversal in Docker Compose's handling of remote OCI artifact annotations.","url":"https://insights.sbomify.com/CVE-2025-62725/"}