CVE-2026-108385: dataclasses-avroschema enum symbols can inject statements through generated member names

Published Oct 13, 2026
·
Updated

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.parseenum and EnumRepresentation.rendersymbols 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.

Affected Software

1 affected component
pypi/dataclasses-avroschema>=0.38.0<=0.70.5

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade dataclasses-avroschema to a version that resolves this vulnerability.

    Fixed in 0.70.6

Event History

Oct 13, 2026
CVE Published
via MITRE·05:56 PM
Data Sourced
via MITRE·05:56 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·06:17 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Who is exposed to this issue?

Applications using dataclasses-avroschema versions 0.38.0 through 0.70.5 are exposed when they directly use generator classes to generate Python code from Avro schemas containing attacker-controlled enum symbols. Code paths that only generate Avro schemas from trusted Python models are not identified as affected by the provided information.

2

What must an attacker control to exploit it?

An attacker needs to supply or influence an Avro schema enum symbol processed by BaseGenerator.parse_enum or EnumRepresentation.render_symbols. The symbol must reach Python code generation, where it is case-converted and inserted into an enum class body without identifier validation.

3

Is user interaction required?

Yes. The supplied severity vector includes UI:R, indicating that a user must cause the vulnerable generator workflow to process the malicious schema.

4

What can happen if exploitation succeeds?

Injected newlines or punctuation can introduce constrained statements into the generated enum class body. This can modify the generated module's namespace or make the module fail to load.

5

How should this be remediated?

Upgrade to version 0.70.6, which validates every enum symbol as a name. Until upgrading, do not directly generate Python code from untrusted Avro schemas, and validate enum symbols as valid Python identifiers before they reach the generator.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203