Skip to main content

dataclasses-avroschema EUVDEUVD-2026-98906

| CVE-2026-108376 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
    Craft Avro schema with malicious enum default
  2. Delivery
    Deliver schema to victim codegen pipeline
  3. Exploit
    Default escapes enum-member reference during generation
  4. Execution
    Injected statements execute on module import
  5. Impact
    Namespace 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.

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 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

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

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

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

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.

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:A/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 - 18:19 EUVD
CVE Published
Oct 13, 2026 - 17:17 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, 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.

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 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.

Business Impact: High
Compensating Controls

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

EPSS Score
0.4%
Top 71% exploitable
Prevalence
Low
niche Python Avro-to-code library, specialized serialization use
Data Quality
5 sources
Confidence: Medium

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· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact
High

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