CVE-2026-108376: dataclasses-avroschema code injection in generated model defaults

CVE-2026-108376 · Severity: high · CVSS 8.8 · Published 2026-10-13

dataclasses-avroschema is a Python library that automatically generates data models and schemas from Avro specifications. Versions 0.47.3 through 0.70.5 allow arbitrary Python code to execute when a crafted Avro schema is used to generate a model, via an unvalidated record name in a default factory. An attacker who controls a schema registry or network traffic could inject malicious code that runs when a model is instantiated.

Technologies: Dataclasses-Avroschema. Vendors: Dataclasses-Avroschema.

Quick answers

Is CVE-2026-108376 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-108376 being exploited in the wild.
How severe is CVE-2026-108376?
High severity, with a CVSS score of 8.8, published 13 October 2026.
Which products and versions are affected?
Dataclasses-Avroschema 0.47.3 through 0.70.5.
Is there a fix for CVE-2026-108376?
Yes: fixed in 0.70.6. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-108376 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-108376?
Check whether you run Dataclasses-Avroschema at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • Fixed in: 0.70.6

Technical details

The vulnerability exists in FieldRepresentation.get_field_default, which inserts a schema-controlled record name directly into the callable position of a generated `default_factory` lambda without validating it as a valid Avro name. A crafted record name can become an arbitrary Python expression that executes during model instantiation. The fix in version 0.70.6 validates record names against the Avro name grammar ([A-Za-z_][A-Za-z0-9_]*), rejecting any that do not conform.

Affected products

  • dataclasses-avroschema dataclasses-avroschema 0.47.3 through 0.70.5

Timeline

  • 2026-10-13: disclosed
  • 2026-08-18: patched

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.