dataclasses-avroschema: Code injection via generated Meta.schema_name
Summary
dataclasses-avroschema generates Python code from Avro schemas. In affected versions, a schema-controlled record name is written into the generated Meta.schema_name string without escaping. A crafted name can terminate the string literal and inject Python statements that run when the generated module is imported. Exploitation requires that an attacker can supply a schema to the generator and that a user generates and imports the resulting module.
Affected
- dataclasses-avroschema 0.62.3 through 0.70.5 (CNA range: >= 0.62.3, < 0.70.6)
Fixed in
- Upgrade to dataclasses-avroschema 0.70.6 or later
Workaround
Unknown.
Exploitation
- CISA SSVC: exploitation status PoC, not automatable, total technical impact
- A public proof-of-concept is referenced in the GitHub advisory; no evidence of active exploitation was found
- Not listed in CISA KEV at the time of research
Our recommendation
- Upgrade all installations to dataclasses-avroschema 0.70.6 or later
- Identify pipelines that generate Python code from Avro schemas received from partners, schema registries or other untrusted sources
- Do not run the generator on untrusted schemas and do not import generated modules that have not been reviewed until the upgrade is complete
- Check development, CI/CD and data-pipeline hosts for affected versions
Public exploits
PoC-in-GitHub, Metasploit and Exploit-DB list nothing for this CVE.
Research sources
- GitHub Security Advisory GHSA-57hr-pcm8-p9j9 github.com
- Release 0.70.6 github.com
- Fix commit 429f3d7 (security patched) github.com
- Commit 919d3e0 (related casing fix) github.com
- VulDB entry 417861 vuldb.com
- OSV CVE-2026-108377 osv.dev
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.62.3 through 0.70.5, ClassRepresentation.render_metaclass inserts a schema-controlled Avro record name into the quoted Meta.schema_name field of generated Python source without escaping it. A crafted name can terminate the string literal and inject statements into the generated class body, which execute when the generated module is imported. Version 0.70.6 fixes the vulnerability by escaping schema values rendered into generated string literals.
NVD references (5)
- https://github.com/marcosschroh/dataclasses-avroschema/commit/429f3d705d2d04c0c65e2ef832daed5ff91318fc
- https://github.com/marcosschroh/dataclasses-avroschema/commit/919d3e07c8938369cfc2c0569007ba373247e74a
- https://github.com/marcosschroh/dataclasses-avroschema/releases/tag/0.70.6
- https://github.com/marcosschroh/dataclasses-avroschema/security/advisories/GHSA-57hr-pcm8-p9j9
- https://github.com/marcosschroh/dataclasses-avroschema/security/advisories/GHSA-57hr-pcm8-p9j9
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.
