🔍 CVE-2026-63720

7.5
CVSS Score
HIGH
2026-07-26
2026-10-24 13:10
✅ 완료

🇰🇷 한글 설명

datamodel-code-generator 0.70.0 미만 버전에서 입력 스키마를 제어할 수 있는 공격자가 원격 코드 실행(RCE)을 수행할 수 있는 코드 주입 취약점이 발견되었습니다. 공격자는 개행 문자와 점(dot)이 없는 파이썬 표현식이 포함된 악성 customBasePath 값을 제공하여, 생성된 모듈이 임포트될 때 임의의 코드를 실행할 수 있습니다.

💡 쉬운 설명

데이터 모델을 만들어주는 프로그램이 사용자가 입력한 값을 검사하지 않고 그대로 코드로 만들어버리는 문제입니다. 이를 통해 해커가 악성 명령어를 심어두면 프로그램이 실행될 때 해커의 명령이 몰래 실행될 수 있습니다.

🇺🇸 원문 (English)

datamodel-code-generator prior to version 0.70.0 contains a code injection vulnerability that allows attackers who control input schemas to achieve remote code execution by supplying a malicious customBasePath value containing embedded newlines and a dot-free Python expression. The crafted value is emitted verbatim into a generated 'from ... import ...' statement without identifier validation, causing arbitrary Python code to execute when the generated module is imported.

📍 영향받는 시스템

datamodel-code-generator version prior to 0.70.0

⚔️ 공격 벡터

악성 customBasePath 값이 포함된 스키마를 입력하여 생성된 파이썬 모듈 임포트 시 코드 실행

🛡️ 대응 방법

datamodel-code-generator를 0.70.0 이상의 최신 버전으로 업데이트하십시오.

🔧 검증 코드

출력된 버전이 0.70.0 미만이면 취약한 상태입니다.

Shell / Script
pip show datamodel-code-generator 2>/dev/null | grep Version

📊 CVSS Vector String

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

💻 영향받는 소프트웨어

Python