Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft Avro schema with malicious enum default
-
DeliveryDeliver schema to victim codegen pipeline
-
ExploitDefault escapes enum-member reference during generation
-
ExecutionInjected statements execute on module import
-
ImpactNamespace modification or module-load denial (DoS)
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 target application uses dataclasses-avroschema's schema-to-Python model generator (the avro-to-code path) on an Avro schema whose enum field carries an attacker-controlled default value, AND that the generated Python module is subsequently imported or executed - the injected statements only run at import time. Applies to versions 0.38.0 through 0.70.5. Limiting factors: the victim must deliberately process an untrusted/attacker-supplied schema through codegen (this is the UI:R gate), so applications that only generate schemas FROM trusted local dataclasses, or that never import attacker-influenced generated code, are not exposed; additionally the payload is constrained because casefy.uppercase case-folds the enum default (injected letters are uppercased), which limits arbitrary payloads to namespace tampering and denial-of-load rather than unconstrained code of the attacker's choosing. |
| Impact | CVSS 3.1 base score is 8.8 (High) with vector AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H, indicating a network-reachable, low-complexity code-injection flaw (CWE-94) that requires user interaction. No EPSS score, CISA KEV listing, or public POC is present in the supplied intelligence, so the exploitation status is 'no public exploit identified at time of analysis' - note, however, that the vendor fix commit (429f3d7) is public and precisely documents the sink, which materially lowers the bar for weaponization even though it is not itself an exploit. The most important nuance the raw CVSS score obscures is the UI:R requirement combined with the product's nature: this is a code-generation library, so exploitation is not drive-by - a victim must feed an attacker-controlled Avro schema through the schema-to-Python model generator and then import/load the resulting module. The description also constrains the primitive: because casefy.uppercase case-folds the enum default, injected letters are uppercased, so this is 'constrained statement injection' (namespace modification or a denial-of-load condition) rather than clean arbitrary code of the attacker's choosing - the C:H/I:H/A:H rating is defensible but the real-world impact ceiling is lower than an unconstrained RCE. Net: a genuine high-severity issue for the specific population that runs untrusted Avro schemas through codegen, but the UI:R gate and niche feature path make it a targeted-exposure risk rather than a mass-exploitation priority. |
| Exploit ScenarioDerived | An attacker submits a malicious Avro schema (for example via an uploaded schema file, a schema registry entry, or an API that accepts schemas) to an application that uses dataclasses-avroschema's model generator to turn Avro schemas into Python code. The schema defines an enum field whose default value contains newlines, operators, or punctuation that survive casefy.uppercase and escape the intended enum-member reference, injecting statements into the generated module. When the victim imports or executes that generated module, the injected code runs, modifying the module namespace or preventing it from loading; no public POC was provided, though the fix commit documents the exact sink. |
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 allows remote, unauthenticated attackers who supply a crafted Avro schema to inject constrained Python statements into the module produced by the schema-to-code generator; the injected code executes when that generated module is imported. Exploitation requires the victim to deliberately process an untrusted schema through the avro-to-code path and then import the resulting module (the UI:R gate), which limits exposure to pipelines that ingest third-party schemas. CVSS 3.1 base score is 8.8 (High) with vector AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H; no public exploit identified at time of analysis, and version 0.70.6 fixes the flaw by validating enum defaults as names.
RemediationAI
Upgrade to dataclasses-avroschema 0.70.6, the vendor-released fix, which validates enum defaults as names and raises the new InvalidSchemaValue exception for values that cannot be safely rendered as code; see the advisory at https://github.com/marcosschroh/dataclasses-avroschema/security/advisories/GHSA-jcjg-gjg5-xp7v and the release at https://github.com/marcosschroh/dataclasses-avroschema/releases/tag/0.70.6. If immediate upgrade is not possible, the most effective compensating control is to stop feeding untrusted Avro schemas into the avro-to-code generator: restrict codegen to schemas from a trusted, curated source and treat any generated module as untrusted code that must be reviewed before it is imported, since the injected statements only run at import or execution time. A stricter option is to pre-validate every enum default in incoming schemas against a whitelist of valid Python identifier characters and reject anything containing newlines, operators or punctuation before code generation; the trade-off is that legitimate but non-conforming schemas will be refused, and validation must be applied consistently or the injection path remains reachable. Running generation and the subsequent import inside a sandboxed, least-privilege process without filesystem or network access reduces the blast radius of namespace tampering or denial-of-load, at the cost of added operational complexity and possible breakage of generation steps that need code execution. Finally, scanning existing deployments for generated modules that fail to import or that contain unexpected statements near enum defaults can identify prior tampering.
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
The root cause is CWE-94 (improper control of generation of code) in the Python model generator. FieldRepresentation.get_field_default rendered a schema-controlled enum field default as an enum member reference, applying casefy.pascalcase to the enum type and casefy.uppercase to the default value, but never validating that the result was a legitimate Python identifier (the code comment notes that casefy.uppercase only case folds, so anything that is not a letter survives into the reference). Because newlines, operators and punctuation were passed through unescaped, an attacker-controlled enum default could terminate the intended member reference and inject statements into the generated source, permitting namespace modification or causing the module to fail loading. The same commit hardened adjacent rendering paths that place schema values into code rather than string literals: enum defaults, record names rendered in callable position, pydantic class names used as annotations (validate_type_expression), alias lists rendered unquoted (validate_aliases), and string/docstring values (escape_string, escape_docstring), adding an InvalidSchemaValue exception for values that cannot be safely rendered. The affected package is identified by CPE cpe:2.3:a:marcosschroh:dataclasses-avroschema:*:*:*:*:*:*:*:* and the flaw applies to the avro-to-code direction only; the reverse path that generates Avro schemas from trusted local dataclasses, Pydantic models or Faust records is not implicated. Case folding of the injected payload by casefy.uppercase constrains what can be injected, limiting practical outcomes to namespace tampering and denial-of-load rather than unconstrained code of the attacker's choosing.
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
Schema is attacker-supplied over the network with no attacker-side auth (AV:N/PR:N), but a victim must run codegen and import the module (UI:R); injected statements run in the module's process (C/I/A:H), scope unchanged.
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
A high-severity code injection flaw in the dataclasses-avroschema library (versions 0.38.0 through 0.70.5) lets an unauthenticated attacker hide executable Python inside a crafted Avro schema, which then runs on the machine that imports the generated module. The realistic exposure is concentrated in engineering and data-platform teams that ingest third-party or partner-supplied schemas through automated schema-to-code pipelines, where a single malicious schema could compromise build agents, developer workstations, or production services holding credentials. Leadership should treat this as a software supply-chain risk to internal build and data infrastructure rather than a broad customer-facing exposure, and prioritize inventorying affected pipelines.
Apply vendor patch (0.70.6); where immediate upgrade is not possible, block untrusted or third-party Avro schemas from the avro-to-code generation path, restrict schema ingestion to approved internal registries, manually review externally sourced schemas before generation, and execute generation and import inside isolated, least-privilege containers or runners without production credentials or network access.
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-98906
NVD
CVE.org
EPSS
GitHub
Exploit-DB