🔍 CVE-2025-62725

0.0
CVSS Score
UNKNOWN
2025-10-27
2026-10-08 11:10
✅ 완료

🇰🇷 한글 설명

Docker Compose가 원격 OCI compose 아티팩트의 경로 정보를 검증 없이 신뢰하여 공격자가 com.docker.compose.file/com.docker.compose.envfile 어노테이션을 통해 캐시 디렉토리 밖의 임의 위치에 파일을 덮어쓸 수 있는 취약점입니다. docker compose config, docker compose ps 등 읽기 전용 명령어 실행 중에도 발생 가능합니다.

💡 쉬운 설명

Docker Compose가 온라인에서 받은 설정 파일의 경로를 제대로 확인하지 않아서, 악의적인 파일이 컴퓨터의 원하는 어느 위치에나 덮어씌워질 수 있습니다. 단순히 설정을 확인하기만 해도 공격받을 수 있습니다.

🇺🇸 원문 (English)

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.

📍 영향받는 시스템

Docker Desktop, Docker Compose v2.40.1 이하 (Linux 스탠드얼론, CI/CD 러너, 클라우드 개발 환경 포함)

⚔️ 공격 벡터

원격 OCI compose 아티팩트의 com.docker.compose.file/com.docker.compose.envfile 어노테이션에 경로 이동(../../../) 시퀀스를 삽입하여 캐시 디렉토리 외부 파일 덮어쓰기

🛡️ 대응 방법

Docker Compose를 v2.40.2 이상으로 업그레이드

🔧 검증 코드

출력된 버전이 2.40.2 이상이면 패치됨, 2.40.1 이하면 취약함

Shell / Script
docker compose version 2>&1 | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1

💻 영향받는 소프트웨어

Docker