CVE-2026-55415
Full vulnerability record from the local CVENow database.
Description
datamodel-code-generator generates Pydantic v2 models, dataclasses, TypedDict, and msgspec.Struct from OpenAPI, JSON Schema, GraphQL, Avro, Protobuf, and raw JSON, YAML, or CSV. From 0.11.6 until 0.64.0, datamodel-code-generator allows attacker-controlled x-python-import or customTypePath schema extensions to reach src/datamodel_code_generator/parser/jsonschema.py and generated import handling through Import.from_full_path and Imports.create_line in src/datamodel_code_generator/imports.py, allowing a newline to break out of an import statement and execute Python code when the generated model is imported. This issue is fixed in version 0.64.0.
Severity
HIGH
CVSS score
7.5
(v3.1)
Vulnerability status
Analyzed
Source identifier
Published
2026-07-28 22:17:48.983000
Last modified
2026-10-23 23:10:00.157000
View original CVE JSON
{
"id": "CVE-2026-55415",
"sourceIdentifier": "[email protected]",
"published": "2026-07-28T22:17:48.983",
"lastModified": "2026-10-23T23:10:00.157",
"vulnStatus": "Analyzed",
"cveTags": [],
"descriptions": [
{
"lang": "en",
"value": "datamodel-code-generator generates Pydantic v2 models, dataclasses, TypedDict, and msgspec.Struct from OpenAPI, JSON Schema, GraphQL, Avro, Protobuf, and raw JSON, YAML, or CSV. From 0.11.6 until 0.64.0, datamodel-code-generator allows attacker-controlled x-python-import or customTypePath schema extensions to reach src/datamodel_code_generator/parser/jsonschema.py and generated import handling through Import.from_full_path and Imports.create_line in src/datamodel_code_generator/imports.py, allowing a newline to break out of an import statement and execute Python code when the generated model is imported. This issue is fixed in version 0.64.0."
},
{
"lang": "es",
"value": "datamodel-code-generator genera modelos Pydantic v2, dataclasses, TypedDict y msgspec.Struct a partir de OpenAPI, JSON Schema, GraphQL, Avro, Protobuf, y JSON, YAML o CSV sin procesar. Desde la versión 0.11.6 hasta la 0.64.0, datamodel-code-generator permite que las extensiones de esquema x-python-import o customTypePath controladas por el atacante lleguen a src/datamodel_code_generator/parser/jsonschema.py y al manejo de importaciones generado a través de Import.from_full_path e Imports.create_line en src/datamodel_code_generator/imports.py, permitiendo que un salto de línea escape de una declaración de importación y ejecute código Python cuando se importa el modelo generado. Este problema está solucionado en la versión 0.64.0."
}
],
"affected": [
{
"source": "[email protected]",
"affectedData": [
{
"vendor": "koxudaxi",
"product": "datamodel-code-generator",
"versions": [
{
"version": ">= 0.11.6, < 0.64.0",
"status": "affected"
}
]
}
]
}
],
"metrics": {
"cvssMetricV31": [
{
"source": "[email protected]",
"type": "Secondary",
"cvssData": {
"version": "3.1",
"vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H",
"baseScore": 7.5,
"baseSeverity": "HIGH",
"attackVector": "NETWORK",
"attackComplexity": "HIGH",
"privilegesRequired": "NONE",
"userInteraction": "REQUIRED",
"scope": "UNCHANGED",
"confidentialityImpact": "HIGH",
"integrityImpact": "HIGH",
"availabilityImpact": "HIGH"
},
"exploitabilityScore": 1.6,
"impactScore": 5.9
}
],
"ssvcV203": [
{
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"ssvcData": {
"timestamp": "2026-07-29T14:05:51.047335Z",
"id": "CVE-2026-55415",
"options": [
{
"exploitation": "poc"
},
{
"automatable": "no"
},
{
"technicalImpact": "total"
}
],
"role": "CISA Coordinator",
"version": "2.0.3"
}
}
]
},
"weaknesses": [
{
"source": "[email protected]",
"type": "Secondary",
"description": [
{
"lang": "en",
"value": "CWE-94"
},
{
"lang": "en",
"value": "CWE-95"
}
]
}
],
"configurations": [
{
"nodes": [
{
"operator": "OR",
"negate": false,
"cpeMatch": [
{
"vulnerable": true,
"criteria": "cpe:2.3:a:koxudaxi:datamodel-code-generator:*:*:*:*:*:*:*:*",
"versionStartIncluding": "0.11.6",
"versionEndExcluding": "0.64.0",
"matchCriteriaId": "183F2563-4911-4606-8690-B0F037C22BF7"
}
]
}
]
}
],
"references": [
{
"url": "https://github.com/koxudaxi/datamodel-code-generator/commit/577d49569c2254c371a97e495020ae2238a73b84",
"source": "[email protected]",
"tags": [
"Patch"
]
},
{
"url": "https://github.com/koxudaxi/datamodel-code-generator/releases/tag/0.64.0",
"source": "[email protected]",
"tags": [
"Release Notes"
]
},
{
"url": "https://github.com/koxudaxi/datamodel-code-generator/security/advisories/GHSA-5578-w22f-pfx9",
"source": "[email protected]",
"tags": [
"Exploit",
"Vendor Advisory"
]
},
{
"url": "https://github.com/koxudaxi/datamodel-code-generator/security/advisories/GHSA-5578-w22f-pfx9",
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"tags": [
"Exploit",
"Vendor Advisory"
]
}
]
}