CVE-2026-108382: dataclasses-avroschema allows code injection through generated enum-symbol string literals

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, EnumRepresentation.rendersymbols concatenates each schema-controlled enum symbol between double quotes in a generated enum assignment. When generator classes are used directly, a quote can terminate the string literal and inject arbitrary Python code into the enum class body, which executes when the generated module is imported. Version 0.70.6 fixes the vulnerability by escaping enum symbol values before rendering them.

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:44 PM
Data Sourced
via MITRE·05:44 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 its generator classes to generate Python code from Avro schemas containing attacker-controlled enum symbols, and then import the generated module.

2

What must an attacker control for exploitation?

An attacker needs control over an enum symbol in an Avro schema processed by the generator. A double quote in that symbol can terminate the generated Python string literal and inject code into the generated enum class body.

3

When does the injected code execute?

The injected Python code executes when the generated module is imported. Generating the code alone is not described as the execution point.

4

What version fixes the issue?

Version 0.70.6 fixes the vulnerability by escaping enum symbol values before they are rendered.

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