Not a U.S. government website. NDD is an independent vulnerability database by Volerion and is not affiliated with or endorsed by NIST or NVD.
VOLERION
Volerion Security Research

NOT DEFERRED DATABASE

VULNERABILITIES

CVE-2026-54654 Details

ANALYZED


This CVE record has been analyzed and enriched by NVDAPI.com as an independent party.

Description

datamodel-code-generator generates Python data models from schema definitions. From 0.14.1 until 0.60.2, the --extra-template-data comment field is rendered into Python comments in src/datamodel_code_generator/model/template/TypeAliasAnnotation.jinja2, src/datamodel_code_generator/model/template/TypedDict.jinja2, src/datamodel_code_generator/model/template/dataclass.jinja2, src/datamodel_code_generator/model/template/msgspec.Struct.jinja2, src/datamodel_code_generator/model/template/pydantic/BaseModel.jinja2, and src/datamodel_code_generator/model/template/pydantic_v2/BaseModel.jinja2 without neutralizing carriage returns in Python # comments, allowing an attacker-controlled comment value to inject Python code into generated models that runs when imported. This issue is fixed in version 0.60.2.

Metrics

References to Advisories, Solutions, and Tools

By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.

Weakness Enumeration

CWE-IDCWE NameSource
CWE-1336Improper Neutralization of Special Elements Used in a Template Engine[email protected]
CWE-94Improper Control of Generation of Code ('Code Injection')[email protected]

Affected Products

ProductVersions
koxudaxi datamodel-code-generator
>= 0.14.1, <= 0.60.1 (semver)

CPE

  • No CPEs found in CPE dictionary for this product.

Remediation

Change History

2 change records found show changes


QUICK INFO

CVE Dictionary Entry:
CVE-2026-54654
NVD Published Date:
Jul 28, 2026
NVD Last Modified:
Jul 30, 2026
Source:
[email protected]
CVE-2026-54654 Details - Not Deferred