Code Execution Vulnerability in dataclasses-avroschema Product by Marcos Schroh
CVE-2026-108381
8.8HIGH
What is CVE-2026-108381?
The dataclasses-avroschema library, which facilitates the generation of Avro schemas from Python dataclasses and Pydantic models, presents a serious vulnerability in versions 0.44.0 through 0.70.5. The way Pydantic and AvroDantic model generators insert a schema field's pydantic-class value allows for arbitrary Python code execution due to insufficient restrictions on the expressions evaluated during module imports. Users should upgrade to version 0.70.6 or later, which resolves the issue by ensuring that only a bare name or a call to a bare name with literal arguments is allowed.
Affected Version(s)
dataclasses-avroschema >= 0.44.0, < 0.70.6
