IT SBIT Services
Schneeberger
DEEN
CVE tracker

dataclasses-avroschema: Code injection via record names in generated default factories

CVE-2026-108376High 8.8

← All vulnerabilities

Summary

The open-source Python library dataclasses-avroschema generates Python code from Avro schemas. In versions 0.47.3 through 0.70.5, a record name from the schema is inserted into generated default_factory code without validation, so a crafted name can become an arbitrary Python expression. The code runs when an instance of the generated model uses that field default. The risk is mainly present where schemas from untrusted sources reach the code generator or model loader.

Affected

  • dataclasses-avroschema from 0.47.3 through 0.70.5 (per the CVE record)
  • The GitHub advisory lists only <= 0.70.5 with no lower bound; whether versions before 0.47.3 are affected is unknown.

Fixed in

  • Fixed in 0.70.6, which rejects record names that do not match the Avro name grammar.

Workaround

Unknown. No vendor workaround is documented. Until upgrading, do not generate models from Avro schemas you do not fully control, and check record names in incoming schemas before they reach the generator.

Exploitation

  • CISA SSVC lists exploitation as 'poc' (a proof of concept exists) and automatable as 'no'.
  • VulDB reports no known exploit, and no in-the-wild exploitation was found.
  • EPSS at 0.00366 (Tenable), a low exploitation likelihood.

Our recommendation

  • Upgrade dataclasses-avroschema to 0.70.6 or later.
  • Check with 'pip show dataclasses-avroschema' or your lock files which version is in use, including in CI and services.
  • Until the upgrade, only generate models from schemas you control, and review schemas from registries or partners.
  • Monitor for unexpected code execution in services that load generated models.

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:46.

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.47.3 through 0.70.5, FieldRepresentation.get_field_default inserts 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. Version 0.70.6 fixes the vulnerability by rejecting record names that do not match the Avro name grammar.

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.