Skip to main content

dataclasses-avroschema CVE-2026-108378

| EUVDEUVD-2026-98964 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
    Deliver crafted Avro schema with malicious doc
  2. Delivery
    Victim runs model generator on schema
  3. Exploit
    Injected code closes docstring, writes class-body statements
  4. Execution
    Victim imports generated module
  5. Impact
    Arbitrary Python executes in process context

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 generate Python code from an attacker-influenced Avro schema using dataclasses-avroschema's model generator and then import the resulting module - the malicious payload lives specifically in a schema record's 'doc' value, which render_docstring (ClassRepresentation) copied into a triple-double-quoted class docstring without escaping quotes or backslashes in versions 0.40.0 through 0.70.5. The concrete trigger is a crafted triple-quote sequence (to close the docstring and inject class-body statements) and/or a trailing backslash (to escape the generated closing delimiter), with execution occurring at module import. Limiting factors: the attacker does not reach a live service directly (UI:R) - a human or pipeline must both run code generation on the untrusted schema and import the generated output, so environments that only generate models from trusted internal dataclasses/Pydantic models are not exposed; fixed in 0.70.6.

Impact

The input CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H, base 8.8) describes a network-reachable, low-complexity, unauthenticated code-injection flaw (CWE-94) whose only gating factor is user interaction (UI:R). That interaction is substantial and materially lowers real-world risk: exploitation requires a victim to feed an attacker-controlled Avro schema into dataclasses-avroschema's model generator AND then import the generated Python module - this is not a passive network service that an attacker can reach directly. No EPSS score, KEV listing, POC reference, or SSVC decision data was provided in the input, so exploitation probability and automatability cannot be quantified from the available signals. The vulnerability is confirmed and well-understood (vendor advisory GHSA-ff3j-hw44-6vx4 plus a fixing commit and release), and the described technique - closing a triple-quoted docstring with a crafted quote/backslash sequence to inject statements executed at import - is concrete and reliable once the schema reaches the generator. Net assessment: a genuine high-severity code-execution bug, but its practical priority is driven by whether an environment actually generates code from untrusted schemas; absent EPSS/KEV/POC evidence this reads as a real-but-conditional risk rather than confirmed widespread exploitation. Note the UI:R and the code-generation-plus-import prerequisite mean the raw 8.8 overstates risk for deployments that only generate schemas from trusted internal models.

Exploit ScenarioDerived

An attacker supplies a malicious Avro schema whose record 'doc' field contains a crafted triple-quote-and-backslash sequence. A developer or automated pipeline runs dataclasses-avroschema's model generator on that schema (e.g. to scaffold Python models from a registry or submitted schema) and imports the generated module, at which point the injected statements execute and run arbitrary Python as the importing process. No public exploit code was identified in the provided data, but the advisory describes the injection mechanics precisely enough to reproduce.

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 versions 0.40.0 through 0.70.5 lets an attacker who controls the doc value of an Avro schema record close the generated class docstring and inject arbitrary Python statements into the emitted class body, achieving code execution when the generated module is imported. The CVSS vector (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H, base 8.8) rates the flaw as network-reachable, low-complexity and unauthenticated with high confidentiality and integrity impact, but exploitation is gated by user interaction: a developer or CI pipeline must both run the library's model generator against the attacker-influenced schema and import the resulting Python file. No public exploit code has been identified at time of analysis, and the vendor released a fix in 0.70.6.

RemediationAI

Vendor-released patch: 0.70.6 - upgrade with pip install --upgrade 'dataclasses-avroschema>=0.70.6', following the released tag 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-ff3j-hw44-6vx4; the fixing commit is 429f3d705d2d04c0c65e2ef832daed5ff91318fc. If an immediate upgrade is not possible, the decisive compensating control is to stop feeding untrusted Avro schemas into the model generator: restrict code generation to trusted, internally authored schemas and treat every generated .py artifact as untrusted source. Because the payload executes at import time inside the generating process, running the generate-and-import step in a sandboxed, unprivileged container with a read-only filesystem and no outbound network limits post-exploitation impact but does not stop the injected code from executing. Ad-hoc filtering of """ or backslashes in doc values is not a reliable substitute, since the same upstream commit hardened other code-rendered schema fields (quoted defaults, enum member names, Pydantic annotation classes, record names, aliases and Meta fields) that a docstring-only filter would miss; and since the CVSS vector is UI:R, keeping schema-to-code generation out of pipelines driven by external parties removes the exposure entirely.

Affected VersionsENISA

dataclasses-avroschema 0.40.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 that bridges Apache Avro schemas and native Python type definitions - dataclasses, Pydantic models and Faust Records - in both directions: it serialises those classes into Avro schemas and, conversely, its model generator emits Python source code from a supplied Avro schema. The defect is a textbook CWE-94 code-injection flaw in that generation path: ClassRepresentation.render_docstring interpolated a schema record's doc value directly into a triple-double-quoted class docstring template without escaping quote sequences or backslashes, so a crafted """ sequence terminated the docstring early and let the remainder of the value be parsed as class-body statements, while a trailing backslash escaped the generated closing delimiter. Similar unsanitised interpolation existed in adjacent code-rendering paths - quoted string/byte field defaults, enum member references, Pydantic annotation classes, record names, aliases and Meta fields - all of which are emitted into the generated module as executable source rather than inert data. Fix commit 429f3d705d2d04c0c65e2ef832daed5ff91318fc addresses the class of issue rather than only the docstring, adding escape_docstring and escape_string helpers plus validate_name, validate_aliases, validate_fullname and validate_type_expression validators and a new InvalidSchemaValue exception that refuses values which cannot be safely escaped into code. CPE metadata identifies the package as cpe:2.3:a:marcosschroh:dataclasses-avroschema:*:*:*:*:*:*:*:*; the trust boundary is the Avro schema supplied to a code-generation step, not a listening network 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

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

Crafted schema is network-deliverable (AV:N) and reliably triggers injection (AC:L) without auth (PR:N), but a victim must generate and import the module (UI:R); import-time code execution yields full 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:34 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.40.0 through 0.70.5, ClassRepresentation.render_docstring copies a schema record's doc value into a generated triple-double-quoted class docstring without escaping quotes or backslashes. A crafted triple-quote sequence can close the docstring and inject statements into the generated class body, while a trailing backslash can escape the generated closing delimiter, allowing Python code execution during module import. Version 0.70.6 fixes the vulnerability by escaping quotes, backslashes, and unsafe control characters before rendering docstrings.

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

Why It Matters

A code-injection flaw in the Python library dataclasses-avroschema (versions 0.40.0 through 0.70.5) allows arbitrary code to be embedded in generated model files when a developer or CI pipeline processes an Avro schema whose record documentation field is attacker-controlled. Because the injected code executes on import, the primary exposure is to engineering workstations and build pipelines rather than to customer-facing production systems, creating a path to credential theft, tampering with build artifacts, and downstream software supply chain compromise. Leadership should care because affected teams are likely unaware they are generating and importing models from untrusted schema sources.

Business Impact: High
Compensating Controls

Apply vendor patch (0.70.6). Until upgrade is complete, generate models only from internally authored and reviewed Avro schemas, never from untrusted or third-party-supplied schema documentation values, and run generation steps in isolated build environments without access to production credentials.

Threat Intelligence Overview

EPSS Score
0.3%
Top 74% exploitable
Prevalence
Low
niche Python library for Avro schema/model generation, specialized ecosystem
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