dataclasses-avroschema field documentation allows code injection in generated Pydantic descriptions
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.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2026-108380
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 3 Nov 2026, 16:25 UTC · Revision 1
Source evidence
dataclasses-avroschema field documentation allows code injection in generated Pydantic descriptions
core-osv · Original sourcePublished 13 Oct 2026, 17:41 UTC
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.
osv:CVE-2026-108380
Complete source record
{
"id": "cbc471cb6e7a3ebe0fdd08c85aba2aed806516c3f7da2d635c97c214b2806b54",
"url": "https://osv.dev/vulnerability/CVE-2026-108380",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "dataclasses-avroschema field documentation allows code injection in generated Pydantic descriptions",
"summary": "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.",
"evidence": "osv:CVE-2026-108380",
"products": [],
"severity": "high",
"structured": {
"id": "CVE-2026-108380",
"aliases": [
"CVE-2026-108380",
"GHSA-g7p7-mgvm-jw7p"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/marcosschroh/dataclasses-avroschema",
"type": "GIT",
"events": [
{
"introduced": "5c882a95be50cf87acc5ba4f4ce8763d8cf76004"
},
{
"fixed": "de45de04f080e829c787a4b22eff92e5e632eaa1"
},
{
"fixed": "429f3d705d2d04c0c65e2ef832daed5ff91318fc"
}
],
"database_specific": {
"extracted_events": [
{
"range": [
{
"introduced": "0.65.9"
},
{
"fixed": "0.70.6"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StringRangeExpression"
},
{
"range": [
{
"fixed": "429f3d705d2d04c0c65e2ef832daed5ff91318fc"
}
],
"source": "REFERENCES_COMMIT"
},
{
"range": [
{
"fixed": "de45de04f080e829c787a4b22eff92e5e632eaa1"
}
],
"source": "REFERENCES_TAG",
"original_tag": "0.70.6"
}
]
}
}
],
"versions": [
"0.70.5",
"0.70.4",
"0.70.3",
"0.70.2",
"0.70.1",
"0.70.0",
"0.69.1",
"0.69.0",
"0.68.1",
"0.68.0",
"0.67.0",
"0.66.4",
"0.66.3",
"0.66.2",
"0.66.1",
"0.66.0",
"0.65.14",
"0.65.13",
"0.65.12",
"0.65.11",
"0.65.10",
"0.65.9"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-108380.json"
}
}
],
"modified": "2026-10-28T02:30:30.341814379Z",
"provider": "osv",
"references": [
"https://github.com/marcosschroh/dataclasses-avroschema/releases/tag/0.70.6",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/108xxx/CVE-2026-108380.json",
"https://github.com/marcosschroh/dataclasses-avroschema/security/advisories/GHSA-g7p7-mgvm-jw7p",
"https://nvd.nist.gov/vuln/detail/CVE-2026-108380",
"https://github.com/marcosschroh/dataclasses-avroschema/commit/429f3d705d2d04c0c65e2ef832daed5ff91318fc",
"https://github.com/marcosschroh/dataclasses-avroschema/pull/843"
],
"provider_metadata": {
"cwe_ids": [
"CWE-94"
],
"cna_assigner": "GitHub_M",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/108xxx/CVE-2026-108380.json"
}
},
"related_cves": [
{
"value": "CVE-2026-108380",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 497335,
"published_at": "2026-10-13T17:41:38.127+00:00"
}