🔍 CVE-2026-108380

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

🇰🇷 한글 설명

dataclasses-avroschema 0.65.9부터 0.70.5 버전에서 PydanticFieldRepresentation.add_field_properties 함수가 스키마 필드의 doc 값을 이스케이프 처리 없이 생성된 코드에 삽입하는 취약점이 발견되었습니다. 공격자가 조작된 따옴표를 포함한 doc 값을 제공할 경우, 생성된 클래스 정의 과정에서 임의의 파이썬 코드가 실행될 수 있습니다.

💡 쉬운 설명

데이터 구조를 자동으로 만들어주는 프로그램이 입력된 설명 문구를 처리할 때 보안 처리를 제대로 하지 않아 발생하는 문제입니다. 악의적인 문구를 넣으면 프로그램이 공격자가 원하는 명령어를 실행하게 만들 수 있습니다.

🇺🇸 원문 (English)

dataclasses-avroschema generates Avro schemas from Python dataclasses, Pydantic models, and Faust Records and generates Python code from Avro schemas. From version 0.65.9 through 0.70.5, PydanticFieldRepresentation.add_field_properties inserts a schema field's doc value between the quotes of a generated pydantic.Field description argument without escaping it. A crafted quote can terminate the string and inject an expression evaluated during generated class definition, allowing arbitrary Python code execution for Pydantic and AvroDantic model generation. Version 0.70.6 fixes the vulnerability by escaping the documentation value before rendering it.

📍 영향받는 시스템

dataclasses-avroschema 0.65.9 ~ 0.70.5

⚔️ 공격 벡터

조작된 따옴표가 포함된 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