Impact
A crafted field documentation entry in dataclasses-avroschema can terminate the string that it inserts into the Pydantic Field description, allowing the attacker to inject arbitrary Python code that is executed at import time. The vulnerability is a classic code‑execution flaw (CWE‑94) that permits the execution of user‑controlled bytecode during automatic model generation. If an attacker supplies a malicious data class that is processed by a vulnerable instance, they can run arbitrary code within the Python process that generates the model, leading to complete compromise of that process.
Affected Systems
The flaw affects the dataclasses‑avroschema package distributed under the marcosschroh vendor. Versions from 0.65.9 through 0.70.5 are vulnerable. All installations that rely on automatic Avro schema generation and Pydantic model creation using these versions are impacted.
Risk and Exploitability
The CVSS score of 8.8 classifies this as a high‑severity vulnerability, indicating a high likelihood of exploitable conditions if the code is executed in an environment where the package is used to generate schemas from untrusted input. The EPSS score is not available, but the lack of a KEV listing suggests there are no confirmed widespread exploitation campaigns yet. The attack vector is inferred to be code injection via crafted field documentation; an adversary can supply a malicious data class definition or schema that, when processed, results in the injection of executable expressions within the generated Pydantic or AvroDantic model code.
OpenCVE Enrichment