Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSupply crafted Avro schema with malicious enum symbols
-
DeliverySchema passed to model-generator classes
-
ExploitUnvalidated symbols rendered into enum class body
-
ExecutionApplication imports/executes generated module
-
ImpactInjected statements run, modifying namespace or blocking module load
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Code injection prevention, sandbox exec
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Initial Access The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires an application to use the dataclasses-avroschema model-generator classes (e.g. BaseGenerator.parse_enum / EnumRepresentation.render_symbols) DIRECTLY on an attacker-controlled Avro schema, AND to subsequently import or execute the generated Python module. The malicious input is specifically an enum symbol containing newlines or punctuation that survives casefy case-conversion unchanged and is written into the enum class body. Limiting factors: this is not the default runtime serialization path (schema generation from trusted Python models is unaffected); the attacker must control the input schema; and the generated code must actually be run for impact. Versions 0.38.0 through 0.70.5 are affected; 0.70.6 validates every enum symbol as a Python identifier and removes the vector. |
| Impact | Signals are moderately aligned but not fully corroborated. The provided CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H → 8.8 High) reflects an unauthenticated code-injection flaw (CWE-94) with high impact to all three properties, and the vendor GitHub advisory (GHSA-gw6w-pvv9-2fqc) plus the fix commit confirm the root cause. However, no EPSS score, no CISA KEV entry, and no public POC were provided, so there is no evidence of real-world exploitation - this is a disclosed-and-patched issue rather than an actively weaponized one. The CVSS AV:N and the 'RCE' tag overstate everyday reach: the description explicitly scopes the flaw to 'when generator classes are used directly,' i.e. a developer/application must feed an untrusted Avro schema into the model-generator API and then import or execute the generated Python module. The injected content is also characterized as 'constrained statements' in an enum class body yielding 'namespace modification or preventing the module from loading,' which is narrower than classic arbitrary RCE. Net: a genuine code-injection bug worth patching, but real-world priority is tempered by the non-default usage pattern and absence of any exploitation telemetry - treat as medium operational priority unless your pipeline executes generated code from untrusted schemas. |
| Exploit ScenarioDerived | A service accepts Avro schemas from an untrusted source and uses dataclasses-avroschema's model-generator classes to turn them into Python code, which it then imports or executes. An attacker submits a schema whose enum symbols contain newlines and punctuation, so after case conversion those symbols are emitted verbatim as code inside the generated enum class body. No public exploit code was identified at time of analysis; exploitation requires user/application interaction (UI:R) to run the generated module. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 13, 2026
Code injection in dataclasses-avroschema versions 0.38.0 through 0.70.5 lets an attacker who controls the Avro schema consumed by the library's model-generator classes inject arbitrary statements into the generated Python source, because enum symbols are used as generated enum member names after case conversion without being validated as Python identifiers. Exploitation is not on the library's default runtime serialization path: it requires an application to invoke the generator classes directly (BaseGenerator.parse_enum / EnumRepresentation.render_symbols) on an attacker-supplied schema and then import or execute the emitted module, which is why the assessed vector carries UI:R despite being network-reachable and unauthenticated (PR:N). Impact when the chain is completed is code execution and namespace modification in the importing process with high confidentiality, integrity, and availability consequences (CVSS 8.8); no confirmed active exploitation (CISA KEV) and no public exploit code identified at time of analysis. Version 0.70.6 fixes the issue by validating every enum symbol as a name.
RemediationAI
Upgrade to dataclasses-avroschema 0.70.6, which is the vendor-released patch: it validates every enum symbol as a name before it is rendered into generated code and raises InvalidSchemaValue for values that are not valid identifiers, and it additionally hardens related code-rendering sites (annotations, enum defaults, record names, Meta aliases, docstrings). Confirm the installed version with pip show dataclasses-avroschema or pip freeze and pin >=0.70.6 in your lockfiles; there is no backport to earlier 0.38.x-0.70.5 branches, so every affected version must move to the fixed release. Where upgrading is not immediately possible, the effective compensating control is to stop feeding untrusted Avro schemas to the model generator: validate or reject schema content before generation, in particular enum symbols and other names/namespaces that are rendered as code, allowing only the Python identifier grammar (letters, digits, underscore, not starting with a digit). The trade-off is that legitimate Avro schemas with exotic-but-legal enum symbols will be rejected until your own normalisation layer maps them to safe Python names, which changes the generated API surface. Additionally, do not import or exec generated modules produced from schemas you do not trust, since that import is the step that turns injected text into executed code; treating generated modules as untrusted artifacts and reviewing them before use is a weaker but still useful control. See the advisory at https://github.com/marcosschroh/dataclasses-avroschema/security/advisories/GHSA-gw6w-pvv9-2fqc and the fix commit at https://github.com/marcosschroh/dataclasses-avroschema/commit/429f3d705d2d04c0c65e2ef832daed5ff91318fc for the exact validation semantics.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
dataclasses-avroschema converts between Python data models (dataclasses, Pydantic models, Faust Records) and Apache Avro schemas, and in the reverse direction it emits Python source code from an Avro schema. The vulnerable code path is the source-emission half: BaseGenerator.parse_enum and EnumRepresentation.render_symbols take each enum symbol from the schema, apply casefy case conversion (e.g. uppercase/pascalcase), and write the result directly into the generated enum class body as a member name. Case conversion only changes letter casing - it strips nothing - so symbols containing newlines or punctuation survive the transform and land in a code position rather than inside a string literal, where escaping does not apply. This is a textbook CWE-94 (Improper Control of Generation of Code) defect: untrusted schema text is concatenated into generated source instead of being validated against the identifier grammar or refused. Attackers can therefore break out of the enum body to modify the enclosing namespace (e.g. rebind names used by the generated module) or to corrupt the module so it fails to load; any payload executes when the generated module is imported. The upstream fix introduces an InvalidSchemaValue exception and a validation layer (validate_name, validate_fullname, validate_aliases, validate_type_expression, escape_string, escape_docstring) applied to values that are rendered as code - names, namespaces, annotations - so that non-identifier symbols are rejected rather than emitted. The same commit hardens adjacent code-rendering sites (Pydantic class annotations, enum default members, record names in callable position, Meta field aliases, and docstrings), confirming the root cause is a general trust-boundary failure between schema content and generated source, not a single function.
Know when Python gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Untrusted schema can arrive over the network (AV:N) with no auth (PR:N), but a separate step must execute the generated module (UI:R); class-body code injection yields full C/I/A impact.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
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.
Articles & Coverage 1
Technical POC Analysis
CWE-94 (Improper Control of Generation of Code).
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
A high-severity code injection flaw in the open-source Python library dataclasses-avroschema (versions 0.38.0 through 0.70.5) can allow an attacker-supplied Avro schema to inject arbitrary code into generated Python modules, leading to code execution inside any application that imports or runs that generated code. The exposure is limited to teams whose services call the library's schema-generation classes directly on untrusted or externally sourced schemas, rather than the library's normal serialization path, and completing the attack requires a user or process to import the resulting module. Because no vendor patch is currently available, leadership should treat this as a supply-chain and data-processing risk for affected engineering teams and prioritize inventory, isolation of untrusted schema inputs, and compensating controls until a fix ships.
No vendor-released patch identified at time of analysis. Interim mitigations: treat all Avro schemas as untrusted input and never pass externally sourced schemas to BaseGenerator.parse_enum or EnumRepresentation.render_symbols; validate and sanitize enum symbols against a strict Python-identifier allowlist before generation; run any required generation in an isolated sandbox or container without production credentials, secrets, or network access, and require human review before importing or executing generated modules; restrict schema ingestion to vetted internal sources and version-pin or vendor the library so unapproved versions cannot be pulled into builds; monitor build and runtime logs for unexpected generated modules or import activity until a fixed release is available.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t
BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser
pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi
The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python
BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica
OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph
pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.
Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301
In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse
Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to
Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/
pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne
EUVD-2026-98982
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB