CVE Catalog

CVE-2026-54655

HighCVSS 7.8
Published: Updated: Translated: NVD NIST

Exploitation Probability (EPSS)

Low risk
0.15%

4th percentile - higher than 4% of all known CVEs

Summary

The datamodel-code-generator tool from version 0.51.0 to 0.60.2 inserts x-python-type values into field annotations without sufficient validation, allowing Python code execution when the generated module is imported.

Risk Assessment

An attacker can inject malicious code via controlled JSON Schema content, leading to remote code execution.

Recommendation

Update datamodel-code-generator to version 0.60.2 or later.

Other vulnerabilities in datamodel-code-generator

See all
Original NVD description (English source)

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.

Vulnerability data from NVD (NIST) · CISA KEV · EPSS