IT SBIT Services
Schneeberger
DEEN
CVE tracker

dataclasses-avroschema: Code injection via unvalidated Avro enum symbols

CVE-2026-108385High 8.8

← All vulnerabilities

Summary

dataclasses-avroschema is a Python library that generates Avro schemas from Python classes and Python code from Avro schemas. Enum symbols from a schema are used as generated enum member names without validation as Python identifiers. An attacker who controls the symbol names in an Avro schema processed by the generator can inject statements into the generated code, which run when the module is imported or prevent it from loading. The issue applies when generator classes are used directly; the library is not a network service.

Affected

  • dataclasses-avroschema from 0.38.0 up to and including 0.70.5 (sources disagree on the lower bound; the vendor advisory should be checked)
  • Mend lists >=0.70.0 and <0.70.6; VulDB lists up to 0.70.5

Fixed in

  • Version 0.70.6 (validates every enum symbol as a name)
  • Version 0.71.0 is the current release according to Snyk; verify on PyPI

Workaround

  • Unknown. No vendor workaround is documented; upgrading is the fix.
  • Until upgraded, do not run the generator on schemas from untrusted sources.

Exploitation

  • CISA SSVC: exploitation status 'poc', automatable: no, technical impact: total.
  • VulDB reports no available exploit; no in-the-wild exploitation found.
  • EPSS: 0.00365 (Tenable).

Our recommendation

  • Inventory Python environments and CI images that use dataclasses-avroschema, including transitive dependencies.
  • Upgrade to version 0.70.6 at minimum; 0.71.0 is the current release according to Snyk.
  • Review or restrict generator runs on schemas from external sources (schema registries, partner feeds, user uploads).
  • Review generated Python code before importing it.

Public exploits

PoC-in-GitHub, Metasploit and Exploit-DB list nothing for this CVE.

Research sources

Researched and written up in English and German by an AI (Claude by Anthropic) based on NVD, CISA, EPSS and the sources listed. The vendor information is authoritative. Researched on 31 Oct 2026, 19:44.

Original description (NVD)

dataclasses-avroschema generates Avro schemas from Python dataclasses, Pydantic models, and Faust Records and generates Python code from Avro schemas. From version 0.38.0 through 0.70.5, BaseGenerator.parse_enum and EnumRepresentation.render_symbols use each schema-controlled enum symbol as a generated enum member name after case conversion but without validating it as an identifier. When generator classes are used directly, newlines and punctuation can inject constrained statements into the generated enum class body, allowing namespace modification or preventing the module from loading. Version 0.70.6 fixes the vulnerability by validating every enum symbol as a name.

NVD references (4)

Sources

The tracker combines official, freely usable data sources – updated continuously:

This product uses data from the NVD API but is not endorsed or certified by the NVD. EPSS data © FIRST.org.

Affected? We can help.

We check whether your systems are affected, install updates and close the gap – continuously with the System Health Checker if you wish.