CVE-2026-108378 dataclasses-avroschema record documentation can terminate generated class docstrings
Attackers can inject Python code into generated class docstrings via crafted Avro schemas, leading to code execution during module import.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- None listed
What is CVE-2026-108378?
CVE-2026-108378 is a high-severity code injection vulnerability in marcosschroh dataclasses-avroschema, published on 13 Oct 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official description
dataclasses-avroschema generates Avro schemas from Python dataclasses, Pydantic models, and Faust Records and generates Python code from Avro schemas. From version 0.40.0 through 0.70.5, ClassRepresentation.render_docstring copies a schema record's doc value into a generated triple-double-quoted class docstring without escaping quotes or backslashes. A crafted triple-quote sequence can close the docstring and inject statements into the generated class body, while a trailing backslash can escape the generated closing delimiter, allowing Python code execution during module import. Version 0.70.6 fixes the vulnerability by escaping quotes, backslashes, and unsafe control characters before rendering docstrings.
Weakness: CWE-94
Which versions are affected by CVE-2026-108378?
How do I fix CVE-2026-108378?
No fix has been published for CVE-2026-108378 yet. Limit exposure of the affected software until one is available.
Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.
Is CVE-2026-108378 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-108378 exists.
Sources
Also known as GHSA-ff3j-hw44-6vx4.