# CVE-2026-108380: dataclasses-avroschema field documentation allows code injection in generated Pydantic descriptions

- Severity: High 8.8 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.45%, higher than 40% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-10-13T17:41:38.127Z
- Modified: 2026-10-16T20:04:29.760Z
- Weaknesses: CWE-94
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- marcosschroh dataclasses-avroschema: >= 0.65.9, < 0.70.6

## References

- <https://github.com/marcosschroh/dataclasses-avroschema/security/advisories/GHSA-g7p7-mgvm-jw7p> (exploit)
- <https://github.com/marcosschroh/dataclasses-avroschema/pull/843>
- <https://github.com/marcosschroh/dataclasses-avroschema/commit/429f3d705d2d04c0c65e2ef832daed5ff91318fc>
- <https://github.com/marcosschroh/dataclasses-avroschema/releases/tag/0.70.6>

## Sources

- CVE List: [CVE-2026-108380](https://www.cve.org/CVERecord?id=CVE-2026-108380), CVE Terms of Use, modified 2026-10-13
- NVD: [CVE-2026-108380](https://nvd.nist.gov/vuln/detail/CVE-2026-108380), Public domain, modified 2026-10-16

---

Page: https://cve.day/CVE-2026-108380 · Whole record: https://cve.day/CVE-2026-108380.json · Rebuilt by cve.day 2026-11-25T22:59:43.880Z
