CVE-2026-108381GHSA-4jmx-9m83-vxx8
dataclasses-avroschema pydantic-class metadata allows code injection in generated annotations
marcosschroh dataclasses-avroschema
CVSS
8.8HighExploitationPublic exploit codeCISA's assessment says proof of concept code is public, assessed 16 Oct 2026. Not in the KEV catalogCISA via CVE List
Exploit odds (EPSS)0.30%Chance of exploitation activity in the next 30 days, higher than 21% of CVEs. Scored 23 Oct 2026FIRST EPSS
Fixed inNone listedNo source names a fixed version. Check the vendor advisory below
What fixes it
No source in this snapshot names a fixed version. The vendor advisories under References are the place to check.
Description
dataclasses-avroschema generates Avro schemas from Python dataclasses, Pydantic models, and Faust Records and generates Python code from Avro schemas. From version 0.44.0 through 0.70.5, the Pydantic and AvroDantic model generators insert a schema field's pydantic-class value after pydantic. in a generated field annotation without safely restricting the expression. Because annotations are evaluated when the generated module is imported, a crafted value can execute arbitrary Python code. Version 0.70.6 fixes the vulnerability by restricting the value to a bare name or a call to a bare name with literal arguments.
Text from CVE List
Affected versions 1
- dataclasses-avroschemaaffected: >= 0.44.0, < 0.70.6CVE List
References 4
- github.com/marcosschroh/dataclasses-avroschema/commit/429f3d705d2d04c0c65e2ef832daed5ff91318fcFixvia CVE List
- github.com/marcosschroh/dataclasses-avroschema/releases/tag/0.70.6Fixvia CVE List
- github.com/marcosschroh/dataclasses-avroschema/security/advisories/GHSA-4jmx-9m83-vxx8Exploitvia CVE List
- github.com/marcosschroh/dataclasses-avroschema/pull/358Referencevia CVE List