🔍 CVE-2024-9407

4.7
CVSS Score
MEDIUM
2024-10-01
2026-10-22 21:17
✅ 완료

🇰🇷 한글 설명

Dockerfile의 RUN --mount 명령어의 bind-propagation 옵션에서 입력 검증 부족으로 임의의 매개변수를 마운트 명령어에 전달할 수 있습니다. 빌드 과정 중 호스트의 민감한 디렉토리를 컨테이너로 마운트하고 파일 내용을 수정할 수 있으며, SELinux 보호도 우회 가능합니다.

💡 쉬운 설명

Docker 빌드 시 컨테이너가 호스트 컴퓨터의 중요한 파일들을 부정하게 접근하고 수정할 수 있는 문제입니다. 보안 설정(SELinux)을 우회하여 접근 권한이 없어야 하는 파일에도 도달할 수 있습니다.

🇺🇸 원문 (English)

A vulnerability exists in the bind-propagation option of the Dockerfile RUN --mount instruction. The system does not properly validate the input passed to this option, allowing users to pass arbitrary parameters to the mount instruction. This issue can be exploited to mount sensitive directories from the host into a container during the build process and, in some cases, modify the contents of those mounted files. Even if SELinux is used, this vulnerability can bypass its protection by allowing the source directory to be relabeled to give the container access to host files.

📍 영향받는 시스템

Docker CE 24.0 이전 버전, Docker BuildKit이 활성화된 환경

⚔️ 공격 벡터

Dockerfile의 RUN --mount=bind,source=/path/to/host 옵션에 악의적인 bind-propagation 매개변수를 주입하여 호스트 민감 디렉토리 접근

🛡️ 대응 방법

Docker를 24.0 이상의 최신 버전으로 업그레이드하여 입력 검증 강화

🔧 검증 코드

Docker 버전이 24 이상 출력되면 패치됨, 24 미만이면 보안 업데이트 필요

Shell / Script
docker --version | grep -oE '[0-9]+' | head -1 | awk '{if ($1 < 24) print "Vulnerable"; else print "Patched"}'

📊 CVSS Vector String

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

💻 영향받는 소프트웨어

Docker