Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessDeliver crafted Avro schema with malicious doc
-
DeliveryVictim runs model generator on schema
-
ExploitInjected code closes docstring, writes class-body statements
-
ExecutionVictim imports generated module
-
ImpactArbitrary Python executes in process 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 that the victim generate Python code from an attacker-influenced Avro schema using dataclasses-avroschema's model generator and then import the resulting module - the malicious payload lives specifically in a schema record's 'doc' value, which render_docstring (ClassRepresentation) copied into a triple-double-quoted class docstring without escaping quotes or backslashes in versions 0.40.0 through 0.70.5. The concrete trigger is a crafted triple-quote sequence (to close the docstring and inject class-body statements) and/or a trailing backslash (to escape the generated closing delimiter), with execution occurring at module import. Limiting factors: the attacker does not reach a live service directly (UI:R) - a human or pipeline must both run code generation on the untrusted schema and import the generated output, so environments that only generate models from trusted internal dataclasses/Pydantic models are not exposed; fixed in 0.70.6. |
| Impact | The input CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H, base 8.8) describes a network-reachable, low-complexity, unauthenticated code-injection flaw (CWE-94) whose only gating factor is user interaction (UI:R). That interaction is substantial and materially lowers real-world risk: exploitation requires a victim to feed an attacker-controlled Avro schema into dataclasses-avroschema's model generator AND then import the generated Python module - this is not a passive network service that an attacker can reach directly. No EPSS score, KEV listing, POC reference, or SSVC decision data was provided in the input, so exploitation probability and automatability cannot be quantified from the available signals. The vulnerability is confirmed and well-understood (vendor advisory GHSA-ff3j-hw44-6vx4 plus a fixing commit and release), and the described technique - closing a triple-quoted docstring with a crafted quote/backslash sequence to inject statements executed at import - is concrete and reliable once the schema reaches the generator. Net assessment: a genuine high-severity code-execution bug, but its practical priority is driven by whether an environment actually generates code from untrusted schemas; absent EPSS/KEV/POC evidence this reads as a real-but-conditional risk rather than confirmed widespread exploitation. Note the UI:R and the code-generation-plus-import prerequisite mean the raw 8.8 overstates risk for deployments that only generate schemas from trusted internal models. |
| Exploit ScenarioDerived | An attacker supplies a malicious Avro schema whose record 'doc' field contains a crafted triple-quote-and-backslash sequence. A developer or automated pipeline runs dataclasses-avroschema's model generator on that schema (e.g. to scaffold Python models from a registry or submitted schema) and imports the generated module, at which point the injected statements execute and run arbitrary Python as the importing process. No public exploit code was identified in the provided data, but the advisory describes the injection mechanics precisely enough to reproduce. |
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.40.0 through 0.70.5 lets an attacker who controls the doc value of an Avro schema record close the generated class docstring and inject arbitrary Python statements into the emitted class body, achieving code execution when the generated module is imported. The CVSS vector (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H, base 8.8) rates the flaw as network-reachable, low-complexity and unauthenticated with high confidentiality and integrity impact, but exploitation is gated by user interaction: a developer or CI pipeline must both run the library's model generator against the attacker-influenced schema and import the resulting Python file. No public exploit code has been identified at time of analysis, and the vendor released a fix in 0.70.6.
RemediationAI
Vendor-released patch: 0.70.6 - upgrade with pip install --upgrade 'dataclasses-avroschema>=0.70.6', following the released tag at https://github.com/marcosschroh/dataclasses-avroschema/releases/tag/0.70.6 and the advisory at https://github.com/marcosschroh/dataclasses-avroschema/security/advisories/GHSA-ff3j-hw44-6vx4; the fixing commit is 429f3d705d2d04c0c65e2ef832daed5ff91318fc. If an immediate upgrade is not possible, the decisive compensating control is to stop feeding untrusted Avro schemas into the model generator: restrict code generation to trusted, internally authored schemas and treat every generated .py artifact as untrusted source. Because the payload executes at import time inside the generating process, running the generate-and-import step in a sandboxed, unprivileged container with a read-only filesystem and no outbound network limits post-exploitation impact but does not stop the injected code from executing. Ad-hoc filtering of """ or backslashes in doc values is not a reliable substitute, since the same upstream commit hardened other code-rendered schema fields (quoted defaults, enum member names, Pydantic annotation classes, record names, aliases and Meta fields) that a docstring-only filter would miss; and since the CVSS vector is UI:R, keeping schema-to-code generation out of pipelines driven by external parties removes the exposure entirely.
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 Apache Avro schemas and native Python type definitions - dataclasses, Pydantic models and Faust Records - in both directions: it serialises those classes into Avro schemas and, conversely, its model generator emits Python source code from a supplied Avro schema. The defect is a textbook CWE-94 code-injection flaw in that generation path: ClassRepresentation.render_docstring interpolated a schema record's doc value directly into a triple-double-quoted class docstring template without escaping quote sequences or backslashes, so a crafted """ sequence terminated the docstring early and let the remainder of the value be parsed as class-body statements, while a trailing backslash escaped the generated closing delimiter. Similar unsanitised interpolation existed in adjacent code-rendering paths - quoted string/byte field defaults, enum member references, Pydantic annotation classes, record names, aliases and Meta fields - all of which are emitted into the generated module as executable source rather than inert data. Fix commit 429f3d705d2d04c0c65e2ef832daed5ff91318fc addresses the class of issue rather than only the docstring, adding escape_docstring and escape_string helpers plus validate_name, validate_aliases, validate_fullname and validate_type_expression validators and a new InvalidSchemaValue exception that refuses values which cannot be safely escaped into code. CPE metadata identifies the package as cpe:2.3:a:marcosschroh:dataclasses-avroschema:*:*:*:*:*:*:*:*; the trust boundary is the Avro schema supplied to a code-generation step, not a listening network service.
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
Crafted schema is network-deliverable (AV:N) and reliably triggers injection (AC:L) without auth (PR:N), but a victim must generate and import the module (UI:R); import-time code execution yields full 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.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.
Articles & Coverage 1
Technical POC Analysis
CWE-94 (Improper Control of Generation of Code / Code Injection).
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
A code-injection flaw in the Python library dataclasses-avroschema (versions 0.40.0 through 0.70.5) allows arbitrary code to be embedded in generated model files when a developer or CI pipeline processes an Avro schema whose record documentation field is attacker-controlled. Because the injected code executes on import, the primary exposure is to engineering workstations and build pipelines rather than to customer-facing production systems, creating a path to credential theft, tampering with build artifacts, and downstream software supply chain compromise. Leadership should care because affected teams are likely unaware they are generating and importing models from untrusted schema sources.
Apply vendor patch (0.70.6). Until upgrade is complete, generate models only from internally authored and reviewed Avro schemas, never from untrusted or third-party-supplied schema documentation values, and run generation steps in isolated build environments without access to production credentials.
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-98964
NVD
CVE.org
EPSS
GitHub
Exploit-DB