CVE-2026-108385 Details
Description
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.
A code injection vulnerability has been identified in dataclasses-avroschema, a package that generates Avro schemas from Python dataclasses, Pydantic models, and Faust Records. The issue affects versions 0.38.0 through 0.70.5. The vulnerability arises because the library's enum handling does not properly validate enum symbols before using them as member names in generated code. This oversight allows for the injection of arbitrary code, which can be executed when the generated module is imported. The problem is particularly pronounced when using the library's generator classes directly, bypassing the built-in validation mechanisms.
Users can upgrade to version 0.70.6 or later, where this vulnerability has been fixed. Instructions for downloading the latest version are available on the dataclasses-avroschema GitHub repository.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Oct 13, 2026CISA-ADP
Assessed Oct 13, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/marcosschroh/dataclasses-avroschema/security/advisories/GHSA-gw6w-pvv9-2fqc | CISA-ADP | AdvisoryExploitRemedyVendor |
| https://github.com/marcosschroh/dataclasses-avroschema/commit/429f3d705d2d04c0c65e2ef832daed5ff91318fc | [email protected] | Source CodeVendor |
| https://github.com/marcosschroh/dataclasses-avroschema/releases/tag/0.70.6 | [email protected] | Release NotesVendor |
| https://github.com/marcosschroh/dataclasses-avroschema/security/advisories/GHSA-gw6w-pvv9-2fqc | [email protected] | AdvisoryExploitRemedyVendor |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-94 | Improper Control of Generation of Code ('Code Injection') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| dataclasses-avroschema | <= 0.70.5 (semver) |
CPE
Remediation
| |
Change History
2 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Oct 13, 2026 | CVE Modified | CISA-ADP |
| Oct 13, 2026 | New CVE Received | [email protected] |
Volerion