Skip to main content

dataclasses-avroschema CVE-2026-108385

| EUVDEUVD-2026-98982 HIGH
Code Injection (CWE-94)
2026-10-13 GitHub_M
8.8
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Supply crafted Avro schema with malicious enum symbols
  2. Delivery
    Schema passed to model-generator classes
  3. Exploit
    Unvalidated symbols rendered into enum class body
  4. Execution
    Application imports/executes generated module
  5. Impact
    Injected statements run, modifying namespace or blocking module load

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 an application to use the dataclasses-avroschema model-generator classes (e.g. BaseGenerator.parse_enum / EnumRepresentation.render_symbols) DIRECTLY on an attacker-controlled Avro schema, AND to subsequently import or execute the generated Python module. The malicious input is specifically an enum symbol containing newlines or punctuation that survives casefy case-conversion unchanged and is written into the enum class body. Limiting factors: this is not the default runtime serialization path (schema generation from trusted Python models is unaffected); the attacker must control the input schema; and the generated code must actually be run for impact. Versions 0.38.0 through 0.70.5 are affected; 0.70.6 validates every enum symbol as a Python identifier and removes the vector.

Impact

Signals are moderately aligned but not fully corroborated. The provided CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H → 8.8 High) reflects an unauthenticated code-injection flaw (CWE-94) with high impact to all three properties, and the vendor GitHub advisory (GHSA-gw6w-pvv9-2fqc) plus the fix commit confirm the root cause. However, no EPSS score, no CISA KEV entry, and no public POC were provided, so there is no evidence of real-world exploitation - this is a disclosed-and-patched issue rather than an actively weaponized one. The CVSS AV:N and the 'RCE' tag overstate everyday reach: the description explicitly scopes the flaw to 'when generator classes are used directly,' i.e. a developer/application must feed an untrusted Avro schema into the model-generator API and then import or execute the generated Python module. The injected content is also characterized as 'constrained statements' in an enum class body yielding 'namespace modification or preventing the module from loading,' which is narrower than classic arbitrary RCE. Net: a genuine code-injection bug worth patching, but real-world priority is tempered by the non-default usage pattern and absence of any exploitation telemetry - treat as medium operational priority unless your pipeline executes generated code from untrusted schemas.

Exploit ScenarioDerived

A service accepts Avro schemas from an untrusted source and uses dataclasses-avroschema's model-generator classes to turn them into Python code, which it then imports or executes. An attacker submits a schema whose enum symbols contain newlines and punctuation, so after case conversion those symbols are emitted verbatim as code inside the generated enum class body. No public exploit code was identified at time of analysis; exploitation requires user/application interaction (UI:R) to run the generated module.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Oct 13, 2026

Code injection in dataclasses-avroschema versions 0.38.0 through 0.70.5 lets an attacker who controls the Avro schema consumed by the library's model-generator classes inject arbitrary statements into the generated Python source, because enum symbols are used as generated enum member names after case conversion without being validated as Python identifiers. Exploitation is not on the library's default runtime serialization path: it requires an application to invoke the generator classes directly (BaseGenerator.parse_enum / EnumRepresentation.render_symbols) on an attacker-supplied schema and then import or execute the emitted module, which is why the assessed vector carries UI:R despite being network-reachable and unauthenticated (PR:N). Impact when the chain is completed is code execution and namespace modification in the importing process with high confidentiality, integrity, and availability consequences (CVSS 8.8); no confirmed active exploitation (CISA KEV) and no public exploit code identified at time of analysis. Version 0.70.6 fixes the issue by validating every enum symbol as a name.

RemediationAI

Upgrade to dataclasses-avroschema 0.70.6, which is the vendor-released patch: it validates every enum symbol as a name before it is rendered into generated code and raises InvalidSchemaValue for values that are not valid identifiers, and it additionally hardens related code-rendering sites (annotations, enum defaults, record names, Meta aliases, docstrings). Confirm the installed version with pip show dataclasses-avroschema or pip freeze and pin >=0.70.6 in your lockfiles; there is no backport to earlier 0.38.x-0.70.5 branches, so every affected version must move to the fixed release. Where upgrading is not immediately possible, the effective compensating control is to stop feeding untrusted Avro schemas to the model generator: validate or reject schema content before generation, in particular enum symbols and other names/namespaces that are rendered as code, allowing only the Python identifier grammar (letters, digits, underscore, not starting with a digit). The trade-off is that legitimate Avro schemas with exotic-but-legal enum symbols will be rejected until your own normalisation layer maps them to safe Python names, which changes the generated API surface. Additionally, do not import or exec generated modules produced from schemas you do not trust, since that import is the step that turns injected text into executed code; treating generated modules as untrusted artifacts and reviewing them before use is a weaker but still useful control. See the advisory at https://github.com/marcosschroh/dataclasses-avroschema/security/advisories/GHSA-gw6w-pvv9-2fqc and the fix commit at https://github.com/marcosschroh/dataclasses-avroschema/commit/429f3d705d2d04c0c65e2ef832daed5ff91318fc for the exact validation semantics.

Affected VersionsENISA

dataclasses-avroschema 0.38.0, < 0.70.6

Affected Packages

euvd dataclasses_avroschema fix: 0.70.6

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 converts between Python data models (dataclasses, Pydantic models, Faust Records) and Apache Avro schemas, and in the reverse direction it emits Python source code from an Avro schema. The vulnerable code path is the source-emission half: BaseGenerator.parse_enum and EnumRepresentation.render_symbols take each enum symbol from the schema, apply casefy case conversion (e.g. uppercase/pascalcase), and write the result directly into the generated enum class body as a member name. Case conversion only changes letter casing - it strips nothing - so symbols containing newlines or punctuation survive the transform and land in a code position rather than inside a string literal, where escaping does not apply. This is a textbook CWE-94 (Improper Control of Generation of Code) defect: untrusted schema text is concatenated into generated source instead of being validated against the identifier grammar or refused. Attackers can therefore break out of the enum body to modify the enclosing namespace (e.g. rebind names used by the generated module) or to corrupt the module so it fails to load; any payload executes when the generated module is imported. The upstream fix introduces an InvalidSchemaValue exception and a validation layer (validate_name, validate_fullname, validate_aliases, validate_type_expression, escape_string, escape_docstring) applied to values that are rendered as code - names, namespaces, annotations - so that non-identifier symbols are rejected rather than emitted. The same commit hardens adjacent code-rendering sites (Pydantic class annotations, enum default members, record names in callable position, Meta field aliases, and docstrings), confirming the root cause is a general trust-boundary failure between schema content and generated source, not a single function.

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

Vendor (GitHub_M) PRIMARY 8.8 HIGH
AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
vuln.today AI 8.8 HIGH

Untrusted schema can arrive over the network (AV:N) with no auth (PR:N), but a separate step must execute the generated module (UI:R); class-body code injection yields full C/I/A impact.

3.1 AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

2
Patch available
Oct 13, 2026 - 19:19 EUVD
CVE Published
Oct 13, 2026 - 17:56 cve.org
HIGH 8.8

DescriptionCVE.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, BaseGenerator.parse_enum and EnumRepresentation.render_symbols use each schema-controlled enum symbol as a generated enum member name after case conversion but without validating it as an identifier. When generator classes are used directly, newlines and punctuation can inject constrained statements into the generated enum class body, allowing namespace modification or preventing the module from loading. Version 0.70.6 fixes the vulnerability by validating every enum symbol as a name.

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

Why It Matters

A high-severity code injection flaw in the open-source Python library dataclasses-avroschema (versions 0.38.0 through 0.70.5) can allow an attacker-supplied Avro schema to inject arbitrary code into generated Python modules, leading to code execution inside any application that imports or runs that generated code. The exposure is limited to teams whose services call the library's schema-generation classes directly on untrusted or externally sourced schemas, rather than the library's normal serialization path, and completing the attack requires a user or process to import the resulting module. Because no vendor patch is currently available, leadership should treat this as a supply-chain and data-processing risk for affected engineering teams and prioritize inventory, isolation of untrusted schema inputs, and compensating controls until a fix ships.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: treat all Avro schemas as untrusted input and never pass externally sourced schemas to BaseGenerator.parse_enum or EnumRepresentation.render_symbols; validate and sanitize enum symbols against a strict Python-identifier allowlist before generation; run any required generation in an isolated sandbox or container without production credentials, secrets, or network access, and require human review before importing or executing generated modules; restrict schema ingestion to vetted internal sources and version-pin or vendor the library so unapproved versions cannot be pulled into builds; monitor build and runtime logs for unexpected generated modules or import activity until a fixed release is available.

Threat Intelligence Overview

EPSS Score
0.4%
Top 71% exploitable
Prevalence
Low
niche Python Avro-schema codegen library, specialized Kafka/Avro tooling use
Social Media
1
Sightings
Data Quality
6 sources
Confidence: High

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.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.4%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

44
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +44
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Code Injection CRITICAL

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.

More in Python

View all
CVE-2025-24016 CRITICAL POC
9.9 Feb 10

Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t

CVE-2025-27520 CRITICAL POC
9.8 Apr 04

BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser

CVE-2025-2945 CRITICAL POC
9.9 Apr 03

pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi

CVE-2013-5093 MEDIUM POC
6.8 Sep 27

The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python

CVE-2025-32375 CRITICAL POC
9.8 Apr 09

BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica

CVE-2014-0224 HIGH POC
7.4 Jun 05

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

CVE-2024-21644 HIGH POC
7.5 Jan 08

pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.

CVE-2026-33017 CRITICAL POC
9.3 Mar 17

Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301

CVE-2017-9462 HIGH POC
8.8 Jun 06

In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse

CVE-2026-49869 CRITICAL POC
10.0 Jun 26

Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2024-21645 MEDIUM POC
5.3 Jan 08

pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy