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 interpolates a fixed type's aliases value directly into a generated types.confixed annotation. A list is represented with quoted entries, but a bare string is emitted as an unquoted Python expression and evaluated when the generated module is imported, allowing arbitrary code execution from a crafted schema. Version 0.70.6 fixes the vulnerability by rejecting aliases values that are not lists.
Published: 2026-10-13
Score: 8.8 High
EPSS: < 1% Very Low
KEV: No
Impact: Arbitrary Code Execution
Action: Patch Immediately
AI Analysis

Impact

The vulnerability lies in BaseGenerator.parse_fixed which interpolates the aliases value of a fixed-type field directly into a generated Avro schema module. If the aliases list contains a bare string, it is emitted as raw Python code and executed when the module is imported, allowing an attacker to run arbitrary code in the context of the importing process. This flaw is classified as CWE-94, an input that results in arbitrary code execution. The impact is the ability to execute malicious code on any system that imports a module produced from a malicious schema.

Affected Systems

This issue affects the Python library dataclasses‑avroschema from vendor marcosschroh. Versions 0.38.0 through 0.70.5 are vulnerable. The newest release, 0.70.6, removes the unsafe behavior by rejecting non‑list aliases.

Risk and Exploitability

The CVSS score of 8.8 indicates a high severity. No EPSS score is available, and it is not listed in the CISA KEV catalog, but the flaw remains exploitable. The attack can be staged by an attacker supplying a crafted Avro schema that contains a malicious bare string alias; the resulting generated Python module will execute that string when imported. Current data suggest this requires the attacker to either control the generation process or have the target include the generated module in its code base. Thus, the exploit is feasible in scenarios where untrusted schemas are processed and the generated module is imported.

Generated by OpenCVE AI on October 13, 2026 at 19:55 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade to dataclasses-avroschema 0.70.6 or later to reject malicious aliases and eliminate the code injection vulnerability.
  • If an upgrade is not immediately possible, do not import generated modules from untrusted schemas; validate or whitelist schema sources before generation.
  • Isolate the code generation and import process by running it in a restricted environment or using code signing to prevent execution of untrusted generated code.

Generated by OpenCVE AI on October 13, 2026 at 19:55 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Wed, 21 Oct 2026 20:45:00 +0000

Type Values Removed Values Added
First Time appeared Marcosschroh
Marcosschroh dataclasses-avroschema
Vendors & Products Marcosschroh
Marcosschroh dataclasses-avroschema

Wed, 14 Oct 2026 09:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Tue, 13 Oct 2026 18:00:00 +0000

Type Values Removed Values Added
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 interpolates a fixed type's aliases value directly into a generated types.confixed annotation. A list is represented with quoted entries, but a bare string is emitted as an unquoted Python expression and evaluated when the generated module is imported, allowing arbitrary code execution from a crafted schema. Version 0.70.6 fixes the vulnerability by rejecting aliases values that are not lists.
Title dataclasses-avroschema allows code injection through fixed-type aliases supplied as a bare string
Weaknesses CWE-94
References
Metrics cvssV3_1

{'score': 8.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H'}


Subscriptions

Marcosschroh Dataclasses-avroschema
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-10-13T20:21:19.992Z

Reserved: 2026-10-09T21:36:27.043Z

Link: CVE-2026-108384

cve-icon Vulnrichment

Updated: 2026-10-13T20:14:09.874Z

cve-icon NVD

Status : Deferred

Published: 2026-10-13T18:17:17.750

Modified: 2026-10-16T20:04:29.760

Link: CVE-2026-108384

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-21T20:24:51Z

Weaknesses
  • CWE-94

    Improper Control of Generation of Code ('Code Injection')