Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft malicious Avro schema with quote-laden enum symbol
-
DeliveryDeliver schema to victim's codegen pipeline
-
ExploitSymbol breaks string literal, injects code into enum body
-
ExecutionVictim imports generated module
-
ImpactArbitrary Python executes in developer/build context
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 (1) use of dataclasses-avroschema's model-generator classes directly to generate Python source from an Avro schema, (2) that the Avro schema's enum symbol values are attacker-controlled or come from an untrusted source, and (3) that the victim subsequently imports the generated Python module, at which point the injected code in the enum class body executes. Limiting factors: this is not triggered by normal schema parsing/serialization - only by the code-generation path; it needs attacker influence over schema content; and it requires the developer/CI step of importing the generated module (UI:R). Affected versions are 0.38.0 through 0.70.5; 0.70.6 neutralizes it by escaping symbol values. Deployments that only generate from trusted, internally-authored schemas, or that never use the generator classes, are not practically exposed. |
| Impact | The provided CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H, base 8.8) rates this as high severity, and the CWE-94 code-injection classification plus the vendor advisory (GHSA-vrq9-94ww-jv3c) and fixing commit confirm the technical reality of arbitrary Python execution. However, the raw score overstates real-world risk for this particular flaw. Exploitation is not a classic remote server attack: it requires a developer to feed an attacker-controlled Avro schema into dataclasses-avroschema's model-generator classes AND then import the generated module - reflected in the UI:R metric. The AV:N label is defensible only because the malicious Avro schema may arrive over a network, but the actual trigger is a build-time/code-generation workflow rather than a running service, so AV:N is arguably generous (verify against your usage - if schemas are only ever locally authored, treat this as closer to local/supply-chain risk). No EPSS score was provided, the CVE is not listed in CISA KEV, and no public exploit/POC was supplied, so there is no evidence of active or widespread exploitation. Net assessment: a genuine, confirmed RCE-class code-injection bug worth patching promptly for anyone who generates Python from untrusted Avro schemas, but it is a conditional, developer-tooling-scoped issue rather than a mass-exploitable internet-facing vulnerability. |
| Exploit ScenarioDerived | A developer uses dataclasses-avroschema's model-generator classes to generate Python code from an Avro schema supplied by an untrusted or external party (e.g., a schema registry or third-party contributor). The schema contains an enum whose symbol value embeds a double quote and Python statements; render_symbols concatenates it into the generated enum class body, and when the developer imports the generated module the injected code executes. No public exploit code was supplied, but the mechanism is straightforward to reproduce from the fixing commit. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 13, 2026
Python code injection in dataclasses-avroschema versions 0.38.0 through 0.70.5 lets an attacker with control over Avro schema content smuggle arbitrary Python statements into the enum class body that the library emits, so simply importing the generated module executes the attacker's code. The flaw sits in EnumRepresentation.render_symbols, which wraps each schema-supplied enum symbol in double quotes without escaping it, allowing a quote character to close the literal and append attacker-chosen Python. The CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H, base 8.8, CWE-94) indicates no privileges are required but that user interaction is essential, since the victim must run the import of the generated file; no public exploit code has been identified at time of analysis and the issue is not listed in CISA KEV, and version 0.70.6 fixes it by escaping enum symbol values before rendering.
RemediationAI
Vendor-released patch: upgrade dataclasses-avroschema to 0.70.6 or later (release notes at https://github.com/marcosschroh/dataclasses-avroschema/releases/tag/0.70.6, advisory GHSA-vrq9-94ww-jv3c at https://github.com/marcosschroh/dataclasses-avroschema/security/advisories/GHSA-vrq9-94ww-jv3c, fixing commit 429f3d705d2d04c0c65e2ef832daed5ff91318fc); because the package is a build-time code generator, the upgrade must be applied everywhere generation runs, including developer workstations and CI images, and any generated modules produced by an older version must be treated as potentially tainted and regenerated or discarded rather than trusted after the library upgrade. As compensating controls, restrict the code-generation path to trusted, internally reviewed Avro schemas and treat externally supplied schemas as untrusted input that must never be fed to the generator classes; if third-party schemas must be processed, pre-screen them with a strict validator that rejects any enum symbol (and any name, namespace, alias, or default) that is not a plain identifier or that contains quote, backslash, newline, or other non-identifier characters, accepting the trade-off that legitimate but unusually named symbols will be refused until the schema is normalized. Alternatively, run schema-to-code generation only in a disposable sandbox with no credentials or network access, and never import freshly generated modules inside privileged CI jobs or production processes, at the cost of added pipeline complexity and slower iteration. Deployments that only parse and serialize schemas can defer the upgrade with lower urgency, but since the affected versions are also missing the broader input validation added in 0.70.6, upgrading remains the durable fix.
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 that bridges Python data models (dataclasses, Pydantic models, Faust Records) and Apache Avro, working in both directions: it derives Avro schemas from Python classes and, via its model-generator classes, produces Python source code from an Avro schema. The vulnerable code path is the code generation side, specifically EnumRepresentation.render_symbols in the Python model generator, which builds an enum assignment by interpolating each enum symbol from the parsed schema into a double-quoted string literal without escaping. Because the symbol is placed inside the quotes verbatim, a symbol containing a double quote terminates the literal and lets the remainder of the symbol be parsed as Python statements inside the generated enum class body, which is a classic CWE-94 code-injection pattern: untrusted data is used to construct executable code. The vendor's fix commit (429f3d705d2d04c0c65e2ef832daed5ff91318fc) is broader than a single escape: it adds a new InvalidSchemaValue exception for schema values that land in code positions (names, namespaces, annotations) where escaping is not applicable and the schema must simply be refused, and adds validations such as escape_string, escape_docstring, validate_name, validate_aliases, validate_fullname and validate_type_expression. The diff shows the same defensive pattern applied to field defaults, byte-string defaults, enum default member references, record names used in callable position, unquoted alias lists in the generated Meta body, and docstrings, confirming that enum symbol rendering was one instance of a wider unescaped-interpolation problem. The CPE entry cpe:2.3:a:marcosschroh:dataclasses-avroschema:*:*:*:*:*:*:*:* identifies the affected package as the marcosschroh PyPI project by name only, without a version bound, so version scoping must come from the advisory text and the changelog (0.38.0 through 0.70.5 vulnerable, 0.70.6 fixed).
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
A crafted schema can arrive over a network (AV:N) with no privileges (PR:N), but a developer must run the generator and import the output (UI:R), yielding 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, EnumRepresentation.render_symbols concatenates each schema-controlled enum symbol between double quotes in a generated enum assignment. When generator classes are used directly, a quote can terminate the string literal and inject arbitrary Python code into the enum class body, which executes when the generated module is imported. Version 0.70.6 fixes the vulnerability by escaping enum symbol values before rendering them.
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
The dataclasses-avroschema Python library (versions 0.38.0 through 0.70.5) contains a code injection flaw that allows an attacker who controls Avro schema content to execute arbitrary Python code when a victim imports the generated module. This affects development, data engineering, and CI/CD environments that process untrusted or third-party Avro schemas, potentially leading to system compromise, data exfiltration, or supply chain attacks. Although no public exploit identified at time of analysis and exploitation requires user interaction, the high severity (CVSS 8.8) warrants immediate remediation by upgrading to version 0.70.6 or later.
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-98978
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB