🔍 CVE-2026-108378

8.8
CVSS Score
HIGH
2026-10-13
2026-10-16 16:00
✅ 완료

🇰🇷 한글 설명

dataclasses-avroschema 0.40.0부터 0.70.5 버전 사이에서 발생하며, Avro 스키마의 doc 값을 클래스 docstring으로 생성할 때 따옴표나 백슬래시를 적절히 이스케이프하지 않는 취약점이 있습니다. 공격자가 조작된 삼중 따옴표 시퀀스를 사용하여 docstring을 닫고 임의의 파이썬 코드를 주입할 수 있으며, 이는 모듈 임포트 시 코드 실행으로 이어질 수 있습니다.

💡 쉬운 설명

데이터 형식을 정의하는 도구가 코드를 자동으로 만들 때, 입력된 글자를 제대로 검사하지 않아 발생합니다. 나쁜 의도를 가진 문자를 넣으면 프로그램이 실행될 때 공격자가 원하는 명령어를 몰래 실행할 수 있습니다.

🇺🇸 원문 (English)

dataclasses-avroschema generates Avro schemas from Python dataclasses, Pydantic models, and Faust Records and generates Python code from Avro schemas. From version 0.40.0 through 0.70.5, ClassRepresentation.render_docstring copies a schema record's doc value into a generated triple-double-quoted class docstring without escaping quotes or backslashes. A crafted triple-quote sequence can close the docstring and inject statements into the generated class body, while a trailing backslash can escape the generated closing delimiter, allowing Python code execution during module import. Version 0.70.6 fixes the vulnerability by escaping quotes, backslashes, and unsafe control characters before rendering docstrings.

📍 영향받는 시스템

dataclasses-avroschema version 0.40.0 through 0.70.5

⚔️ 공격 벡터

조작된 Avro 스키마의 doc 필드에 삼중 따옴표와 파이썬 코드를 주입하여 모듈 임포트 시 실행

🛡️ 대응 방법

dataclasses-avroschema를 취약점이 해결된 버전인 0.70.6 이상으로 업데이트하십시오.

🔧 검증 코드

출력된 버전이 0.70.5 이하이면 취약한 상태이며, 0.70.6 이상이면 안전합니다.

Shell / Script
pip show dataclasses-avroschema 2>/dev/null | grep Version

📊 CVSS Vector String

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

💻 영향받는 소프트웨어

Python