cve.bz

CVE-2026-54655

7.8 highEPSS 0.2%

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.

CVSS 3.1
7.8CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
EPSS
0.2% chance of exploitation in the next 30 days; higher than 11% of CVEs (scores of 2026-10-25)
CWE
CWE-94
Published
Modified
Record from
the NVD, synced

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-m34r-v34r-rf9qPyPIdatamodel-code-generator>=0.51.0 <0.60.20.60.2
PYSEC-2026-3562PyPIdatamodel-code-generator>=0.51.0 <0.60.20.60.2

References

Check your stackJSON