Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSupply crafted Avro schema record name
-
DeliveryVictim runs schema-to-Python model generator
-
ExploitName terminates Meta.schema_name string literal
-
ExecutionInjected statements written into generated class body
-
ImpactCode executes on module import
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 an attacker control (or taint) the Avro schema's record 'name' value AND that a victim use the Python code-generation feature (Avro schema → Python model) on that schema and subsequently IMPORT the generated module - import is when the injected code runs. The realistic prerequisite is an untrusted or externally-sourced schema flowing into the generator (e.g., a shared/remote schema registry or attacker-supplied schema file); it does NOT trigger merely by producing Avro schemas from trusted dataclasses. Limiting factors: requires user interaction (running the generator and importing output), affects only versions 0.62.3 through 0.70.5, and has no impact if all consumed schemas are trusted. Not remotely exploitable against a running service by default - the attack surface is the code-generation/build pipeline. |
| Impact | This is a genuine high-severity code-injection flaw (CWE-94) but its real-world priority is moderated by the exploitation workflow rather than the raw 8.8 score. The CVSS vector (AV:N/AC:L/PR:N/UI:R/S:U) correctly captures that no authentication to the library is needed and complexity is low, but the UI:R component is load-bearing: a victim developer must run the Avro-schema-to-Python code generator on an attacker-influenced schema AND then import the generated module for code to execute. This is a developer-/build-tooling exposure, not an internet-facing server flaw, which tempers the 'network' framing. No EPSS score was provided and the CVE is NOT listed in CISA KEV, so exploitation status is 'no public exploit identified at time of analysis' - the only exploit-relevant artifacts supplied are the vendor's own remediation commit diffs, which demonstrate the injection point but are not weaponized POC code. The absence of EPSS/KEV data means widespread or targeted exploitation cannot be confirmed either way. Net assessment: a real and clearly-exploitable injection in a code-generation path, but exploitation depends on an untrusted-schema supply chain into a niche library, so it is a 'patch promptly where used' issue rather than an emergency internet-wide priority. VERIFY: AV:N is defensible only if schemas are pulled from remote registries; if schemas are always local files, the practical vector is closer to local. |
| Exploit ScenarioDerived | An attacker publishes or injects a malicious Avro schema (for example into a shared schema registry or a repository the target consumes) whose record 'name' value contains a crafted string that closes the quoted Meta.schema_name literal and appends arbitrary Python statements. A developer runs dataclasses-avroschema's model generator against that schema and imports the resulting module, at which point the injected statements execute in the developer's or CI environment. No public exploit code has been identified, though the fixing commit diffs clearly reveal the unescaped injection point. |
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.62.3 through 0.70.5 allows an attacker-supplied Avro record name to break out of the quoted Meta.schema_name string literal and inject arbitrary Python statements into the generated model's class body, which then execute when that generated module is imported. The assessed vector (CVSS:3.1/AV:N/AC:L/PR:N/UI:R) means no authentication is required but a victim must run the Avro-to-Python code generator on an untrusted or tainted schema and subsequently import the generated file; generating Avro schemas from trusted local dataclasses does not trigger it. Vendor-released patch: 0.70.6. No public exploit identified at time of analysis, and the issue is not confirmed actively exploited (no CISA KEV entry).
RemediationAI
Upgrade to dataclasses-avroschema 0.70.6, which escapes schema values rendered into generated string literals and rejects unsafe values placed in code positions; the fixes are in commits 429f3d705d2d04c0c65e2ef832daed5ff91318fc and 919d3e07c8938369cfc2c0569007ba373247e74a, with the release 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-57hr-pcm8-p9j9. Because the exploit path is schema-in, code-out, the most effective compensating control if you cannot patch immediately is to stop routing untrusted schemas into the Python code generator: treat any schema registry, shared repository or uploaded schema file as untrusted input and run schema-to-Python generation only for schemas you authored, accepting the trade-off that externally supplied schemas can no longer be onboarded until you upgrade. Where untrusted schemas must be processed, sanitize record names, namespaces, aliases and enum member names against a strict identifier whitelist (for example ^[A-Za-z_][A-Za-z0-9_.]*$) before generation, and generate and import the output inside an isolated, non-privileged build sandbox or ephemeral container with no access to production credentials, network or secrets; the trade-off is added pipeline complexity and the risk that legitimate schemas using unusual naming are wrongly rejected. Do not treat the generated module as data - audit or hash-pin generated files before import - and consider disabling the Avro-to-Python generation step entirely in production environments where it is not required. Note that the CVSS vector carries UI:R, so user/workflow interaction is part of the attack, but no public exploit code has been identified at time of analysis.
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 both generates Avro schemas from dataclasses, Pydantic models and Faust Records, and performs the reverse direction by generating Python model source code from an Avro schema. The vulnerability is a CWE-94 code-injection class defect in the reverse direction: ClassRepresentation.render_metaclass substitutes schema-derived values into class templates with Template.safe_substitute but, for values placed inside the quoted Meta.schema_name field (METACLASS_FIELD_TEMPLATE), performed no string escaping. Because an Avro record's "name" is schema-controlled data that was treated as safe template input, a name containing a closing quote and a newline could terminate the literal and append executable statements to the generated class body, giving arbitrary code execution at import time of the generated module. The 0.70.6 fix addresses the whole class of unsafe rendering: it adds a validations module with escape_string, escape_docstring, validate_name, validate_aliases, validate_fullname and validate_type_expression helpers plus a new InvalidSchemaValue exception, and applies escaping to quoted contexts (string/bytes defaults, docstrings, schema_name) while refusing schemas whose values land in unquoted code positions such as the pydantic class annotation, enum member references, aliases and record names used in callable position. The commit diffs also fix related unescaped paths in docstrings, enum defaults and pydantic type expressions, indicating the flaw was a broad rendering-hygiene problem rather than a single sink. The relevant CPE is cpe:2.3:a:marcosschroh:dataclasses-avroschema:*:*:*:*:*:*:*:*, and the attack surface is the code-generation/build pipeline rather than a listening 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
Arbitrary Python executes on import giving full C/I/A impact; PR:N since no library auth, UI:R because a developer must generate and import the module, AV:N as schemas may be fetched remotely.
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.62.3 through 0.70.5, ClassRepresentation.render_metaclass inserts a schema-controlled Avro record name into the quoted Meta.schema_name field of generated Python source without escaping it. A crafted name can terminate the string literal and inject statements into the generated class body, which execute when the generated module is imported. Version 0.70.6 fixes the vulnerability by escaping schema values rendered into generated string literals.
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
dataclasses-avroschema versions 0.62.3 through 0.70.5 allow code that is generated from an attacker-supplied Avro schema to execute arbitrary Python when that generated module is later imported, turning an ordinary schema-exchange step into a code execution path. Exposure is concentrated in teams that run the Avro-to-Python generator against schemas received from outside the organization and build on shared CI/CD runners or developer workstations, where execution could compromise source code, build artifacts, and the credentials stored in those environments. Leadership should treat this as a supply-chain quality issue for engineering pipelines, not just a library defect, because the affected hosts are typically the ones holding deployment credentials.
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-98962
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB