PT-2026-65606

CVE-2026-54654

·

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.14.1 through 0.60.1
Description Code injection is possible when the --extra-template-data file contains a comment value with a carriage return (r). The software renders this comment variable into Python comments within several templates without neutralizing line terminators. Because the Python tokenizer treats a carriage return as a physical-line terminator, the comment is prematurely ended, allowing subsequent text to be parsed and executed as Python code when the generated models are imported. This can lead to arbitrary code execution in the process of the importer.
Recommendations Upgrade datamodel-code-generator to version 0.60.2 or later. As a temporary mitigation, avoid using the --extra-template-data flag or ensure that the comment values in the extras file do not contain carriage returns (r), vertical tabs (x0b), or form feeds (x0c).
Exploitability
Exploit
Fix
Impacts
Vendors
Affected products
Related identifiers
GHSA-WJV6-JCFJ-MF9R
PYSEC-2026-3566
Found an issue in the description? Have something to add? Feel free to write us 👾