Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSupply attacker-controlled Avro schema with crafted enum default
-
ExploitInjected statements escape the enum member reference
-
ExecutionVictim imports generated Python module
-
ImpactArbitrary code runs / namespace modified or import fails
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 that the victim run dataclasses-avroschema's Avro-schema-to-Python code generator (model_generator) on an attacker-controlled Avro schema, specifically one containing an enum field whose default value includes newlines, operators, or punctuation; because casefy.uppercase only case-folds, these characters survive into the rendered enum member reference and escape it as injected code. The injected statements execute when the generated module is imported/loaded, enabling namespace modification or a denial of module loading. Affected versions are 0.38.0 through 0.70.5. Limiting factors: the attacker cannot trigger this via normal runtime schema generation - it requires the code-generation path plus subsequent import of the generated module, so deployments that only generate schemas from their own trusted models, or never import attacker-influenced generated code, are not exposed. |
| Impact | This is a genuine code-injection flaw (CWE-94) in dataclasses-avroschema's Avro-to-Python code generator, confirmed and patched by the maintainer in 0.70.6. The input CVSS of 8.8 (AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H) accurately reflects that an attacker who controls an Avro schema can inject statements into the generated module. However, the network vector is contingent: exploitation is only 'remote' in the sense that a malicious schema can arrive over the network - the actual trigger requires a victim to run the code-generation path on that schema and then import/load the resulting module (hence UI:R). No EPSS score, KEV listing, or public POC was provided in the input, so there is no public exploit identified at time of analysis and no evidence of active exploitation; this is a high-CVSS issue whose real-world risk is gated by a fairly specific usage pattern (generating Python code from untrusted Avro schemas) rather than a broadly automatable remote RCE. Priority is moderate-to-high for the subset of deployments that generate code from externally sourced schemas, and low for the many users who only use the library to produce schemas from their own trusted models. |
| Exploit ScenarioDerived | An application uses dataclasses-avroschema's model generator to convert an externally supplied Avro schema into Python source. An attacker submits a schema containing an enum field whose default value embeds newlines and punctuation; after case conversion this 'default' is rendered unvalidated as an enum member reference, letting the attacker inject arbitrary statements that execute when the generated module is imported. No public exploit code was identified in the provided data. |
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 0.38.0 through 0.70.5 allows an attacker who supplies a crafted Avro schema to the library's Avro-to-Python code generator (model_generator) to embed arbitrary Python statements into the generated module via an enum field default, and those statements execute when the generated module is imported, either modifying the module namespace or preventing it from loading (CVSS 3.1 8.8, CWE-94). The CVSS vector (AV:N/AC:L/PR:N/UI:R) indicates the flaw is unauthenticated but requires user interaction: a victim must run the generator against the attacker-controlled schema and then import the resulting module, so environments that only generate code from their own trusted models or never load attacker-influenced generated code are not exposed. The maintainer confirmed and patched the issue in 0.70.6 by validating enum defaults as names; no public exploit code has been identified at time of analysis, and no active exploitation is confirmed (CISA KEV) at the time of writing.
RemediationAI
Upgrade to dataclasses-avroschema 0.70.6, which is the vendor-released patch: it adds InvalidSchemaValue and rejects schema-supplied enum defaults (and related names, aliases, and annotations) that are not valid Python identifiers, so the injection no longer reaches the generated module. Confirm the upgrade through the PyPI/package manager and verify the resolved version is at least 0.70.6, then regenerate any modules that were previously produced from untrusted or third-party Avro schemas and re-import them only after review; details are in GHSA-4xxf-mv22-hcr8 and the 0.70.6 release notes, with the code change in commit 429f3d705d2d04c0c65e2ef832daed5ff91318fc. If upgrading is not immediately possible, the primary compensating control is to never run model_generator on Avro schemas from untrusted or external sources, and to treat generated Python modules as executable code: generate them only from schemas you control, inspect the emitted source before importing it, and gate generation behind a code review or automated check that flags enum defaults containing characters outside [A-Za-z0-9_]. Where third-party schemas must be processed, run generation and import inside a throwaway sandbox without access to credentials, filesystem mounts, or the network; this isolates the injected statements but adds operational overhead and can break legitimate pipelines that need the generated models in-process. Note that pre-0.70.6 escaping of the enum default is not a reliable workaround because the value is rendered in code position rather than a string literal, so schema-side sanitization that maps enum defaults to valid identifiers (rejecting anything that is not a bare name) is the safest interim mitigation, at the cost of rejecting schemas that use non-identifier enum default symbols.
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 is a Python library (PyPI package under vendor marcosschroh, CPE cpe:2.3:a:marcosschroh:dataclasses-avroschema) that converts between Python data models and Avro schemas and, in the other direction, generates Python source code from Avro schemas. The vulnerable path is in the schema-to-Python generator: FieldRepresentation.get_field_default rendered a schema-controlled enum field default as an enum member reference by applying casefy.pascalcase to the enum type and casefy.uppercase to the default value, but casefy.uppercase only case-folds and performs no identifier validation, so newlines, operators, and punctuation in the default survived into the generated source. Because the value lands in code position rather than a string literal, escaping does not help and the characters can close the member reference and inject new statements into the generated module. This is CWE-94 (Improper Control of Generation of Code / code injection) in a code-generation context, and the impact manifests when the generated module is imported and the injected statements are evaluated. The fix released in 0.70.6 introduces an InvalidSchemaValue exception for schema values rendered as code and adds a validations module (validate_name, validate_fullname, validate_aliases, validate_type_expression) that refuses schema-supplied enum defaults, record names, aliases, and Pydantic class annotations that are not valid names, while also escaping string defaults, docstrings, and quoted Meta field values. CPE data confirms the affected component as the marcosschroh dataclasses-avroschema package across the 0.38.0 through 0.70.5 range.
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
Attacker needs no privileges and the schema can arrive over the network (AV:N/PR:N), but a victim must run codegen and import the module (UI:R); successful injection yields full code execution (C/I/A:H).
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, FieldRepresentation.get_field_default renders a schema-controlled enum field default as an enum member reference after applying case conversion but without validating it as an identifier. Newlines, operators, and punctuation can escape the intended reference and inject constrained statements into the generated module, allowing namespace modification or preventing the module from loading. Version 0.70.6 fixes the vulnerability by validating enum defaults as names.
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
CVE-2026-108383 is a high-severity code injection flaw in the dataclasses-avroschema Python library (versions 0.38.0 through 0.70.5) that lets arbitrary Python statements hidden in an attacker-supplied Avro schema execute in any environment that generates and then imports the resulting module. Exposure is limited to teams that point the Avro-to-Python generator at schemas they do not control and later load the generated code, which in practice means developer workstations and CI/CD build pipelines rather than customer-facing production services. Leadership should care because a successful attack would run with the privileges and network access of those build and developer environments, creating a credible path to supply-chain compromise; no public exploit identified at time of analysis and no active exploitation is confirmed (CISA KEV), while the maintainer has released a fix in 0.70.6.
Apply vendor patch.
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-98980
NVD
CVE.org
EPSS
GitHub
Exploit-DB