🔍 CVE-2024-3924

4.4
CVSS Score
MEDIUM
2024-05-30
2026-04-15 00:35
✅ 완료

🇰🇷 한글 설명

HuggingFace의 text-generation-inference 저장소 autodocs.yml 워크플로우에서 github.head_ref 입력값이 안전하지 않게 처리되어 코드 인젝션이 가능합니다. 공격자는 악의적인 브랜치명으로 저장소를 포크한 후 풀 리퀘스트를 생성하여 GitHub Actions 러너에서 임의의 코드를 실행할 수 있습니다.

💡 쉬운 설명

HuggingFace의 자동 문서 생성 시스템이 특수한 이름의 브랜치를 제대로 검증하지 않아 공격자가 악의적인 명령어를 실행할 수 있는 문제입니다. 저장소를 복사한 후 이름에 명령어를 숨겨서 보낸 풀 리퀘스트로 공격이 가능합니다.

🇺🇸 원문 (English)

A code injection vulnerability exists in the huggingface/text-generation-inference repository, specifically within the `autodocs.yml` workflow file. The vulnerability arises from the insecure handling of the `github.head_ref` user input, which is used to dynamically construct a command for installing a software package. An attacker can exploit this by forking the repository, creating a branch with a malicious payload as the name, and then opening a pull request to the base repository. Successful exploitation could lead to arbitrary code execution within the context of the GitHub Actions runner. This issue affects versions up to and including v2.0.0 and was fixed in version 2.0.0.

📍 영향받는 시스템

HuggingFace text-generation-inference v2.0.0 이하

⚔️ 공격 벡터

저장소 포크 → 악의적 브랜치명(인젝션 페이로드) 생성 → 풀 리퀘스트 제출 → GitHub Actions 워크플로우 실행

🛡️ 대응 방법

text-generation-inference를 2.0.0 이상으로 업그레이드하거나 워크플로우 파일에서 github.head_ref에 대한 입력값 검증 추가

🔧 검증 코드

Version이 2.0.0 이상이면 안전함. 2.0.0 이하 버전이 나타나면 업그레이드 필요.

Shell / Script
pip show text-generation-inference 2>/dev/null | grep -i version

📊 CVSS Vector String

CVSS Vector
CVSS:3.0/AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N

💻 영향받는 소프트웨어

Git