🔍 CVE-2023-39523

6.8
CVSS Score
MEDIUM
2023-08-07
2026-06-17 06:12
✅ 완료

🇰🇷 한글 설명

ScanCode.io의 docker fetch 프로세스 중 docker_reference 파라미터에 악성 명령어를 삽입할 수 있는 커맨드 인젝션 취약점이 발견되었습니다. 공격자는 세미콜론(;) 등을 사용하여 검증되지 않은 쉘 명령어를 실행함으로써 서버나 컨테이너에 피해를 입힐 수 있습니다.

💡 쉬운 설명

프로그램이 외부에서 입력받은 값을 제대로 검사하지 않고 컴퓨터 명령어로 바로 실행해버리는 보안 약점입니다. 해커가 특수 기호를 섞어 명령어를 입력하면 서버를 마음대로 조종할 수 있습니다.

🇺🇸 원문 (English)

ScanCode.io is a server to script and automate software composition analysis with ScanPipe pipelines. Prior to version 32.5.1, the software has a possible command injection vulnerability in the docker fetch process as it allows to append malicious commands in the `docker_reference` parameter. In the function `scanpipe/pipes/fetch.py:fetch_docker_image` the parameter `docker_reference` is user controllable. The `docker_reference` variable is then passed to the vulnerable function `get_docker_image_platform`. However, the `get_docker_image_plaform` function constructs a shell command with the passed `docker_reference`. The `pipes.run_command` then executes the shell command without any prior sanitization, making the function vulnerable to command injections. A malicious user who is able to create or add inputs to a project can inject commands. Although the command injections are blind and the user will not receive direct feedback without logs, it is still possible to cause damage to the server/container. The vulnerability appears for example if a malicious user adds a semicolon after the input of `docker://;`, it would allow appending malicious commands. Version 32.5.1 contains a patch for this issue. The `docker_reference` input should be sanitized to avoid command injections and, as a workaround, one may avoid creating commands with user controlled input directly.

📍 영향받는 시스템

ScanCode.io version 32.5.1 미만 버전

⚔️ 공격 벡터

docker_reference 파라미터에 세미콜론(;) 등을 이용한 악성 쉘 명령어 삽입

🛡️ 대응 방법

ScanCode.io를 최신 패치 버전인 32.5.1 이상으로 업데이트

🔧 검증 코드

출력된 버전이 32.5.1보다 낮으면 취약한 상태이며, 32.5.1 이상이면 안전합니다.

Shell / Script
pip show scancode-io 2>/dev/null | grep Version

📊 CVSS Vector String

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

💻 영향받는 소프트웨어

Docker