CVE-2026-108380
HighCVSS 8.8Summary
The dataclasses-avroschema library versions 0.65.9 through 0.70.5 does not escape the doc value inserted into the description argument of pydantic.Field, allowing injection of an expression and arbitrary Python code execution during class definition. It affects Pydantic and AvroDantic model generation.
Risk Assessment
An attacker able to supply a crafted Avro schema can execute arbitrary Python code in the application context, leading to full system compromise.
Recommendation
Update the dataclasses-avroschema library to version 0.70.6 or later, which escapes the documentation value before rendering it.
Other vulnerabilities in dataclasses-avroschema
See all- CVE-2026-108385High
The dataclasses-avroschema library versions 0.38.0 through 0.70.5 does not validate enum symbols as identifiers, allowing injection of statements into the generated enum class. This can lead to namespace modification or prevent the module from loading.
- CVE-2026-108384High
The dataclasses-avroschema library versions 0.38.0 through 0.70.5 improperly handles the aliases value of a fixed type, inserting it unquoted into a types.confixed annotation. This allows arbitrary Python code execution when the generated module is imported.
- CVE-2026-108383High
The dataclasses-avroschema library versions 0.38.0 through 0.70.5 does not validate the default value of an enum field as an identifier, allowing injection of statements into the generated module. This can lead to namespace modification or prevent the module from loading.
- CVE-2026-108382High
The dataclasses-avroschema library versions 0.38.0 through 0.70.5 does not escape enum symbols, allowing injection of arbitrary Python code into the enum class body. This code executes when the generated module is imported.
- CVE-2026-108381High
The dataclasses-avroschema library versions 0.44.0 through 0.70.5 does not safely restrict the pydantic-class value in field annotations, allowing arbitrary Python code execution when the generated module is imported. It affects Pydantic and AvroDantic model generators.
- CVE-2026-108379High
The dataclasses-avroschema library versions 0.38.0 through 0.70.5 does not escape or validate the namespace value of a fixed type, inserting it in quotes into a types.confixed annotation. This allows arbitrary Python code execution when the generated class is defined.
- CVE-2026-108378High
dataclasses-avroschema versions 0.40.0 through 0.70.5 fail to escape quotes or backslashes when copying a schema record's doc value into a generated class docstring. A crafted triple-quote sequence can close the docstring and inject statements into the generated class body, leading to Python code execution during module import.
- CVE-2026-108377High
dataclasses-avroschema versions 0.62.3 through 0.70.5 insert a schema-controlled Avro record name into the quoted Meta.schema_name field of generated Python source without escaping it. A crafted name can terminate the string literal and inject statements into the generated class body that execute when the module is imported.
- CVE-2026-108376High
dataclasses-avroschema versions 0.47.3 through 0.70.5 insert a schema-controlled referenced record name into the callable position of a generated default_factory lambda without validating it as an Avro name. A crafted record name can become an arbitrary Python expression that executes when an instance of the generated model consumes the field default.
- CVE-2026-108375High
dataclasses-avroschema versions 0.38.0 through 0.70.5 insert schema-controlled string, UUID, bytes, and fixed field defaults into quoted literals in generated Python source without escaping them. A crafted default can terminate the literal and inject statements into the generated module that execute when the module is imported.
Original NVD description (English source)
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.
Vulnerability data from NVD (NIST) · CISA KEV · EPSS

