Skip to main content

CVE-2026-108379: CWE-94: Improper Control of Generation of Code ('Code Injection') in marcosschroh dataclasses-avroschema

0
High
VulnerabilityCVE-2026-108379cvecve-2026-108379cwe-94
Published: 10/13/2026 (10/13/2026, 17:40:21 UTC)
Source: CVE Database V5
Vendor/Project: marcosschroh
Product: dataclasses-avroschema

Description

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_fixed inserts a fixed type's namespace value between quotes inside a generated types.confixed annotation without escaping or validating it. A crafted quote can terminate the namespace string and alter the surrounding annotation expression, which Python evaluates when the generated class is defined, allowing arbitrary code execution. Version 0.70.6 fixes the vulnerability by requiring the namespace to be a dot-separated sequence of valid Avro names.

CVSS v3.1

Score 8.8high

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Affected software

marcosschroh

dataclasses-avroschema

Affected versions
>=0.38.0 <0.70.6
dataclasses-avroschema
pkg:pypi/dataclasses-avroschema

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 10/13/2026, 18:03:51 UTC

Technical Analysis

The dataclasses-avroschema library generates Python code from Avro schemas. In versions 0.38.0 through 0.70.5, the BaseGenerator.parse_fixed method inserts the fixed type's namespace value into a types.confixed annotation without escaping or validating it. If an attacker supplies a namespace containing crafted quotes, they can terminate the string early and inject arbitrary Python code into the generated class definition. This leads to arbitrary code execution when the class is defined. Version 0.70.6 mitigates this by requiring namespaces to be valid Avro names separated by dots, preventing injection.

Potential Impact

Successful exploitation allows an attacker to execute arbitrary Python code in the context where the generated class is defined. This can lead to full compromise of the application or environment running the vulnerable dataclasses-avroschema code. The CVSS 3.1 score is 8.8 (high), reflecting network attack vector, low attack complexity, no privileges required, user interaction required, and high impact on confidentiality, integrity, and availability.

Mitigation Recommendations

Upgrade to dataclasses-avroschema version 0.70.6 or later, which enforces validation of the namespace to prevent code injection. No other mitigations are indicated or required once the upgrade is applied.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-10-09T21:36:27.043Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 6ace6f1a2cdf04f656910f47

Added to database: 10/13/2026, 17:49:15 UTC

Last enriched: 10/13/2026, 18:03:51 UTC

Last updated: 10/13/2026, 20:34:34 UTC

Views: 6

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses