🔍 CVE-2024-21531

5.3
CVSS Score
MEDIUM
2024-10-01
2026-04-15 00:35
✅ 완료

🇰🇷 한글 설명

git-shallow-clone 패키지의 gitShallowClone 함수에서 process 변수에 대한 입력 검증이 부재하여 명령어 주입 취약점이 발생합니다. 공격자가 악의적인 입력값을 전달하면 임의의 시스템 명령어를 실행할 수 있습니다.

💡 쉬운 설명

git-shallow-clone 패키지가 사용자 입력을 제대로 확인하지 않아, 악의적인 사람이 서버에서 임의의 명령어를 실행할 수 있습니다. 이를 '명령어 주입(Command Injection)'이라고 합니다.

🇺🇸 원문 (English)

All versions of the package git-shallow-clone are vulnerable to Command injection due to missing sanitization or mitigation flags in the process variable of the gitShallowClone function.

📍 영향받는 시스템

git-shallow-clone 모든 버전 (npm 패키지)

⚔️ 공격 벡터

gitShallowClone 함수의 process 파라미터에 쉘 메타문자(;, |, &, backtick, $() 등)가 포함된 입력값을 전달하여 임의 명령어 실행

🛡️ 대응 방법

git-shallow-clone을 최신 버전으로 업데이트하거나, 입력값에 대한 검증 및 이스케이프 처리를 구현하며, 필요시 child_process 실행 시 shell: false 옵션 설정

🔧 검증 코드

설치된 git-shallow-clone의 버전 확인 후, 해당 버전이 보안 업데이트를 제공하는 최신 버전인지 npm 패키지 페이지에서 확인하여 업그레이드 필요 여부 판단

Shell / Script
npm list git-shallow-clone 2>/dev/null | grep git-shallow-clone

📊 CVSS Vector String

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

💻 영향받는 소프트웨어

Git