CVE-2026-54655
Full vulnerability record from the local CVENow database.
Description
datamodel-code-generator generates Python data models from schema definitions. From 0.51.0 until 0.60.2, x-python-type values parsed by src/datamodel_code_generator/parser/jsonschema.py in _get_python_type_override are inserted into generated field annotations without sufficient validation, allowing attacker-controlled JSON Schema content to execute Python code when the generated module is imported. This issue is fixed in version 0.60.2.
Severity
HIGH
CVSS score
7.8
(v3.1)
Vulnerability status
Deferred
Source identifier
Published
2026-07-28 22:17:40.360000
Last modified
2026-10-23 23:10:00.157000
View original CVE JSON
{
"id": "CVE-2026-54655",
"sourceIdentifier": "[email protected]",
"published": "2026-07-28T22:17:40.360",
"lastModified": "2026-10-23T23:10:00.157",
"vulnStatus": "Deferred",
"cveTags": [],
"descriptions": [
{
"lang": "en",
"value": "datamodel-code-generator generates Python data models from schema definitions. From 0.51.0 until 0.60.2, x-python-type values parsed by src/datamodel_code_generator/parser/jsonschema.py in _get_python_type_override are inserted into generated field annotations without sufficient validation, allowing attacker-controlled JSON Schema content to execute Python code when the generated module is imported. This issue is fixed in version 0.60.2."
},
{
"lang": "es",
"value": "datamodel-code-generator genera modelos de datos Python a partir de definiciones de esquema. Desde la versión 0.51.0 hasta la 0.60.2, los valores x-python-type analizados por src/datamodel_code_generator/parser/jsonschema.py en _get_python_type_override se insertan en las anotaciones de campo generadas sin validación suficiente, lo que permite que el contenido de esquema JSON controlado por el atacante ejecute código Python cuando se importa el módulo generado. Este problema está corregido en la versión 0.60.2."
}
],
"affected": [
{
"source": "[email protected]",
"affectedData": [
{
"vendor": "koxudaxi",
"product": "datamodel-code-generator",
"versions": [
{
"version": ">= 0.51.0, < 0.60.2",
"status": "affected"
}
]
}
]
}
],
"metrics": {
"cvssMetricV31": [
{
"source": "[email protected]",
"type": "Secondary",
"cvssData": {
"version": "3.1",
"vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
"baseScore": 7.8,
"baseSeverity": "HIGH",
"attackVector": "LOCAL",
"attackComplexity": "LOW",
"privilegesRequired": "NONE",
"userInteraction": "REQUIRED",
"scope": "UNCHANGED",
"confidentialityImpact": "HIGH",
"integrityImpact": "HIGH",
"availabilityImpact": "HIGH"
},
"exploitabilityScore": 1.8,
"impactScore": 5.9
}
],
"ssvcV203": [
{
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"ssvcData": {
"timestamp": "2026-07-29T12:46:44.431126Z",
"id": "CVE-2026-54655",
"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"
}
]
}
],
"references": [
{
"url": "https://github.com/koxudaxi/datamodel-code-generator/commit/2c93c9b712f43391dcfa975a1e4aa0b7c93ccbba",
"source": "[email protected]"
},
{
"url": "https://github.com/koxudaxi/datamodel-code-generator/releases/tag/0.60.2",
"source": "[email protected]"
},
{
"url": "https://github.com/koxudaxi/datamodel-code-generator/security/advisories/GHSA-m34r-v34r-rf9q",
"source": "[email protected]"
},
{
"url": "https://github.com/koxudaxi/datamodel-code-generator/security/advisories/GHSA-m34r-v34r-rf9q",
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0"
}
]
}