Skip to main content

dataclasses-avroschema CVE-2026-108383

| EUVDEUVD-2026-98980 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 attacker-controlled Avro schema with crafted enum default
  2. Exploit
    Injected statements escape the enum member reference
  3. Execution
    Victim imports generated Python module
  4. Impact
    Arbitrary code runs / namespace modified or import fails

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 run dataclasses-avroschema's Avro-schema-to-Python code generator (model_generator) on an attacker-controlled Avro schema, specifically one containing an enum field whose default value includes newlines, operators, or punctuation; because casefy.uppercase only case-folds, these characters survive into the rendered enum member reference and escape it as injected code. The injected statements execute when the generated module is imported/loaded, enabling namespace modification or a denial of module loading. Affected versions are 0.38.0 through 0.70.5. Limiting factors: the attacker cannot trigger this via normal runtime schema generation - it requires the code-generation path plus subsequent import of the generated module, so deployments that only generate schemas from their own trusted models, or never import attacker-influenced generated code, are not exposed.

Impact

This is a genuine code-injection flaw (CWE-94) in dataclasses-avroschema's Avro-to-Python code generator, confirmed and patched by the maintainer in 0.70.6. The input CVSS of 8.8 (AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H) accurately reflects that an attacker who controls an Avro schema can inject statements into the generated module. However, the network vector is contingent: exploitation is only 'remote' in the sense that a malicious schema can arrive over the network - the actual trigger requires a victim to run the code-generation path on that schema and then import/load the resulting module (hence UI:R). No EPSS score, KEV listing, or public POC was provided in the input, so there is no public exploit identified at time of analysis and no evidence of active exploitation; this is a high-CVSS issue whose real-world risk is gated by a fairly specific usage pattern (generating Python code from untrusted Avro schemas) rather than a broadly automatable remote RCE. Priority is moderate-to-high for the subset of deployments that generate code from externally sourced schemas, and low for the many users who only use the library to produce schemas from their own trusted models.

Exploit ScenarioDerived

An application uses dataclasses-avroschema's model generator to convert an externally supplied Avro schema into Python source. An attacker submits a schema containing an enum field whose default value embeds newlines and punctuation; after case conversion this 'default' is rendered unvalidated as an enum member reference, letting the attacker inject arbitrary statements that execute when the generated module is imported. No public exploit code was identified in the provided data.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.3% 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 0.38.0 through 0.70.5 allows an attacker who supplies a crafted Avro schema to the library's Avro-to-Python code generator (model_generator) to embed arbitrary Python statements into the generated module via an enum field default, and those statements execute when the generated module is imported, either modifying the module namespace or preventing it from loading (CVSS 3.1 8.8, CWE-94). The CVSS vector (AV:N/AC:L/PR:N/UI:R) indicates the flaw is unauthenticated but requires user interaction: a victim must run the generator against the attacker-controlled schema and then import the resulting module, so environments that only generate code from their own trusted models or never load attacker-influenced generated code are not exposed. The maintainer confirmed and patched the issue in 0.70.6 by validating enum defaults as names; no public exploit code has been identified at time of analysis, and no active exploitation is confirmed (CISA KEV) at the time of writing.

RemediationAI

Upgrade to dataclasses-avroschema 0.70.6, which is the vendor-released patch: it adds InvalidSchemaValue and rejects schema-supplied enum defaults (and related names, aliases, and annotations) that are not valid Python identifiers, so the injection no longer reaches the generated module. Confirm the upgrade through the PyPI/package manager and verify the resolved version is at least 0.70.6, then regenerate any modules that were previously produced from untrusted or third-party Avro schemas and re-import them only after review; details are in GHSA-4xxf-mv22-hcr8 and the 0.70.6 release notes, with the code change in commit 429f3d705d2d04c0c65e2ef832daed5ff91318fc. If upgrading is not immediately possible, the primary compensating control is to never run model_generator on Avro schemas from untrusted or external sources, and to treat generated Python modules as executable code: generate them only from schemas you control, inspect the emitted source before importing it, and gate generation behind a code review or automated check that flags enum defaults containing characters outside [A-Za-z0-9_]. Where third-party schemas must be processed, run generation and import inside a throwaway sandbox without access to credentials, filesystem mounts, or the network; this isolates the injected statements but adds operational overhead and can break legitimate pipelines that need the generated models in-process. Note that pre-0.70.6 escaping of the enum default is not a reliable workaround because the value is rendered in code position rather than a string literal, so schema-side sanitization that maps enum defaults to valid identifiers (rejecting anything that is not a bare name) is the safest interim mitigation, at the cost of rejecting schemas that use non-identifier enum default symbols.

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 is a Python library (PyPI package under vendor marcosschroh, CPE cpe:2.3:a:marcosschroh:dataclasses-avroschema) that converts between Python data models and Avro schemas and, in the other direction, generates Python source code from Avro schemas. The vulnerable path is in the schema-to-Python generator: FieldRepresentation.get_field_default rendered a schema-controlled enum field default as an enum member reference by applying casefy.pascalcase to the enum type and casefy.uppercase to the default value, but casefy.uppercase only case-folds and performs no identifier validation, so newlines, operators, and punctuation in the default survived into the generated source. Because the value lands in code position rather than a string literal, escaping does not help and the characters can close the member reference and inject new statements into the generated module. This is CWE-94 (Improper Control of Generation of Code / code injection) in a code-generation context, and the impact manifests when the generated module is imported and the injected statements are evaluated. The fix released in 0.70.6 introduces an InvalidSchemaValue exception for schema values rendered as code and adds a validations module (validate_name, validate_fullname, validate_aliases, validate_type_expression) that refuses schema-supplied enum defaults, record names, aliases, and Pydantic class annotations that are not valid names, while also escaping string defaults, docstrings, and quoted Meta field values. CPE data confirms the affected component as the marcosschroh dataclasses-avroschema package across the 0.38.0 through 0.70.5 range.

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

Attacker needs no privileges and the schema can arrive over the network (AV:N/PR:N), but a victim must run codegen and import the module (UI:R); successful injection yields full code execution (C/I/A:H).

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 - 19:19 EUVD
CVE Published
Oct 13, 2026 - 17:47 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

CVE-2026-108383 is a high-severity code injection flaw in the dataclasses-avroschema Python library (versions 0.38.0 through 0.70.5) that lets arbitrary Python statements hidden in an attacker-supplied Avro schema execute in any environment that generates and then imports the resulting module. Exposure is limited to teams that point the Avro-to-Python generator at schemas they do not control and later load the generated code, which in practice means developer workstations and CI/CD build pipelines rather than customer-facing production services. Leadership should care because a successful attack would run with the privileges and network access of those build and developer environments, creating a credible path to supply-chain compromise; no public exploit identified at time of analysis and no active exploitation is confirmed (CISA KEV), while the maintainer has released a fix in 0.70.6.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.3%
Top 80% exploitable
Prevalence
Low
niche Python library for Avro/Kafka schema workflows, not broadly deployed
Social Media
1
Sightings
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.3%
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