PT-2026-65610

CVE-2026-54655

·

Published

2026-07-28

·

Updated

2026-08-04

Description by

CVSS 3.1
7.8
High
MetricsAV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Name of the Vulnerable Software and Affected Versions datamodel-code-generator versions 0.51.0 through 0.60.1
Description Insufficient validation of x-python-type values in the get python type override() function within src/datamodel code generator/parser/jsonschema.py allows attacker-controlled JSON Schema content to execute arbitrary Python code. When a schema author uses the x-python-type extension to override a generated Python type, the value is inserted into the generated field annotations without adequate sanitization. An attacker can bypass the existing sanitization by placing a bracket [ early in the string, allowing them to embed arbitrary Python statements. This code is executed at class-definition time the moment the generated module is imported by a developer or a CI runner.
Recommendations Upgrade datamodel-code-generator to version 0.60.2 or later.
Exploitability
Exploit
Fix
Impacts
Vendors
Affected products
Related identifiers
GHSA-M34R-V34R-RF9Q
PYSEC-2026-3562
Found an issue in the description? Have something to add? Feel free to write us 👾