dataclasses-avroschema: Code injection via record names in generated default factories
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
- OSV: CVE-2026-108376 osv.dev
- GitHub Security Advisory GHSA-jcjg-gjg5-xp7v github.com
- Fix commit 429f3d7 github.com
- Release 0.70.6 github.com
- VulDB: 417854 vuldb.com
- Tenable: CVE-2026-108376 www.tenable.com
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)
- https://github.com/marcosschroh/dataclasses-avroschema/commit/429f3d705d2d04c0c65e2ef832daed5ff91318fc
- https://github.com/marcosschroh/dataclasses-avroschema/releases/tag/0.70.6
- https://github.com/marcosschroh/dataclasses-avroschema/security/advisories/GHSA-jcjg-gjg5-xp7v
- https://hackmd.io/@1ExmmukzRMWN7B4gQ4W-4Q/cve-2026-110113-publiccms-trade-address-save-cross-user-overwrite
Sources
The tracker combines official, freely usable data sources – updated continuously:
- NVD (NIST) – CVEs, rating (CVSS), affected products
- CISA KEV – vulnerabilities confirmed by CISA as actively exploited
- CISA Vulnrichment – CISA assessment (SSVC) in the official CVE record
- FIRST EPSS – probability of exploitation
- Microsoft MSRC – Patch Tuesday: vulnerabilities, severity, updates
- PoC-in-GitHub – public proof-of-concept repositories
- Metasploit (Rapid7) – modules of the Metasploit Framework
- Exploit-DB (OffSec) – archive of public exploits (links only)
- Patch days: official vendor pages (linked per vendor) (Vendor patch days)
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.
