Skip to main content

dataclasses-avroschema EUVDEUVD-2026-98976

| CVE-2026-108380 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 doc
  2. Delivery
    Victim runs Pydantic/AvroDantic model generation
  3. Exploit
    Quote terminates description string
  4. Execution
    Injected expression evaluated at class definition
  5. Impact
    Arbitrary Python code execution in generator process

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 invoke dataclasses-avroschema's Pydantic or AvroDantic model-generation path on an Avro schema the attacker controls, where the schema includes a 'doc' attribute on a field; the doc value is inserted unescaped between the quotes of a generated pydantic.Field(description="...") argument, so a crafted quote closes the string and injects a Python expression evaluated when the generated class is defined. Limiting factors: only versions 0.65.9 through 0.70.5 are affected (fixed in 0.70.6); only the Pydantic and AvroDantic generators are vulnerable (plain dataclass and Faust generation do not render the doc as a Field description); and exploitation depends on the user actively running code generation over an untrusted or externally-sourced schema rather than any always-on network service.

Impact

The CVSS 3.1 base score of 8.8 (AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H) reflects a genuine arbitrary-code-execution flaw (CWE-94), but real-world urgency is tempered by the exploitation model: this is a developer/build-time code-generation library, and the malicious input is an Avro schema whose 'doc' field breaks out of a generated pydantic.Field description string. The AV:N rating is defensible because Avro schemas are frequently pulled from shared schema registries or other systems, yet the practical trigger is a victim choosing to run Pydantic/AvroDantic model generation over an attacker-controlled schema (hence UI:R), so this is not a remotely-sprayable server exploit. No EPSS score, KEV listing, SSVC decision, or public POC is present in the provided intelligence - the only exploit-relevant artifacts are the fix PR, fix commit, and 0.70.6 release. Exploitation status: no public exploit identified at time of analysis. Net: a real code-injection bug worth patching promptly in any pipeline that generates code from untrusted or externally-sourced Avro schemas, but closer to a supply-chain/build-tooling risk than a mass-exploited internet-facing CVE, and the headline 8.8 overstates the likelihood of opportunistic widespread exploitation.

Exploit ScenarioDerived

An attacker publishes or submits an Avro schema whose field 'doc' value contains a crafted double-quote followed by a Python expression that closes the description string and appends an evaluated call. When a developer or automated pipeline runs dataclasses-avroschema's Pydantic or AvroDantic model generation on that schema, the injected expression is evaluated during generated class definition, executing arbitrary Python in the generating process. No public POC is referenced in the provided data, but the mechanism is fully confirmed by the fix diff.

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

Arbitrary Python code execution is possible in dataclasses-avroschema versions 0.65.9 through 0.70.5 when the library's Pydantic or AvroDantic model-generation path is run over an Avro schema the attacker controls: the schema field's 'doc' value is interpolated unescaped between the quotes of a generated pydantic.Field(description="...") argument, so a crafted quote can close the string and inject a Python expression that is evaluated when the generated class is defined (CWE-94). The assessed vector is CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H (8.8), reflecting high confidentiality and integrity impact with user interaction required because a developer or build process must actively generate models from the malicious schema; no public exploit code has been identified at time of analysis and the issue is not in CISA KEV, and urgency is further moderated because only the Pydantic/AvroDantic generators are affected and only versions 0.65.9-0.70.5 are vulnerable.

RemediationAI

Vendor-released patch: upgrade dataclasses-avroschema to 0.70.6 or later (release tag https://github.com/marcosschroh/dataclasses-avroschema/releases/tag/0.70.6, fix commit 429f3d705d2d04c0c65e2ef832daed5ff91318fc, PR https://github.com/marcosschroh/dataclasses-avroschema/pull/843; advisory GHSA-g7p7-mgvm-jw7p), which escapes the Avro 'doc' value before rendering it into the generated pydantic.Field description and routes the AvroDantic generator through the same safe representation class. Where upgrading is not immediately possible, treat Avro schemas from untrusted or externally sourced registries as hostile input to the Pydantic/AvroDantic generators: run model generation only in an isolated, low-privilege sandbox or disposable container with no credentials, network egress, or secrets mounted, since any tooling that still evaluates the generated class body will execute injected expressions; strip or reject the 'doc' attribute on fields (or sanitize/escape double quotes and backslashes in it) before generation, at the cost of losing field documentation in the generated models; and gate generation behind schema review or a trusted schema registry rather than consuming arbitrary schema files. Note that these are compensating controls with trade-offs (reduced documentation fidelity, added build complexity) and do not substitute for the 0.70.6 upgrade; no public exploit code has been identified at time of analysis, but the exploitation model - developer or CI invoking code generation on an attacker-influenced schema - means build pipelines and code-generation services should be prioritized for the update.

Affected VersionsENISA

dataclasses-avroschema 0.65.9, < 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 that converts Python dataclasses, Pydantic models, and Faust Records into Avro schemas and, in the opposite direction, generates Python source code from an Avro schema. The vulnerable component is the model generator under model_generator/lang/python, specifically PydanticFieldRepresentation.add_field_properties, which builds the source text for each generated field. When an Avro field carries metadata containing 'doc', that value is rendered directly as description="{doc}" with no escaping of embedded quote characters or other Python-significant syntax. Because the generated source is subsequently compiled and its class body evaluated (the pydantic.Field(...) argument expression is evaluated during class definition), an attacker-supplied doc string such as one that closes the quote and appends arbitrary expressions is executed as Python code in the context of whoever runs the generator. The root-cause class is CWE-94 (Improper Control of Generation of Code / Code Injection), i.e. unsafe string interpolation into generated source rather than a memory-safety or deserialization flaw. The upstream fix (PR #843, commit 429f3d705d2d04c0c65e2ef832daed5ff91318fc, release 0.70.6) introduces PydanticFieldRepresentation with an escaping-aware get_field_metadata/add_field_properties override and wires field_representation_class into BaseGenerator so the AvroDantic generator also uses the same safe representation; the CPE record cpe:2.3:a:marcosschroh:dataclasses-avroschema:*:*:*:*:*:*:*:* identifies the package as the affected artifact.

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 supplies a schema that may arrive over the network (AV:N), but the victim must actively run model generation on it (UI:R), yielding full code execution (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 - 19:19 EUVD
CVE Published
Oct 13, 2026 - 17:41 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.65.9 through 0.70.5, PydanticFieldRepresentation.add_field_properties inserts a schema field's doc value between the quotes of a generated pydantic.Field description argument without escaping it. A crafted quote can terminate the string and inject an expression evaluated during generated class definition, allowing arbitrary Python code execution for Pydantic and AvroDantic model generation. Version 0.70.6 fixes the vulnerability by escaping the documentation value before rendering it.

Technical POC Analysis

Advisory: GHSA-g7p7-mgvm-jw7p (marcosschroh/dataclasses-avroschema).

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

The dataclasses-avroschema library, versions 0.65.9 through 0.70.5, contains a code injection vulnerability (CVE-2026-108380) that allows unauthenticated attackers to execute arbitrary Python code when a developer or build process generates models from a malicious Avro schema. This could lead to supply chain compromise, data breaches, and loss of integrity in affected development environments. Leadership should prioritize remediation because the library is a common dependency in data pipelines and model generation workflows, though no public exploit identified at time of analysis and exploitation requires user interaction.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations include: (1) Restrict Avro schema processing to trusted sources and never process attacker-controlled schemas. (2) Implement input validation to escape or reject quotes and special characters in the 'doc' field before model generation. (3) Downgrade to a dataclasses-avroschema version prior to 0.65.9, if compatible. (4) Monitor vendor advisory for a patch and apply immediately when available.

Threat Intelligence Overview

EPSS Score
0.4%
Top 62% exploitable
Prevalence
Low
niche Python Avro code-generation library, specialized developer tooling
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