CVE-2026-54621
Last modified
CVE-2026-54621 is a high-severity vulnerability rated 7.8/10 on the CVSS scale. datamodel-code-generator generates Python data models from schema definitions. Prior to 0.60.1, GraphQL Union description values in src/datamodel_code_generator/model/template/UnionTypeStatement.jinja2 and src/datamodel_code_generator/model/template/UnionTypeStatement.py312.jinja2 are rendered into Python comments without neutralizing carriage returns in Python # comments, allowing attacker-controlled GraphQL schema content to inject Python code into generated models that runs when imported. EPSS estimates a 0.14% chance of exploitation in the next 30 days.
Description
datamodel-code-generator generates Python data models from schema definitions. Prior to 0.60.1, GraphQL Union description values in src/datamodel_code_generator/model/template/UnionTypeStatement.jinja2 and src/datamodel_code_generator/model/template/UnionTypeStatement.py312.jinja2 are rendered into Python comments without neutralizing carriage returns in Python # comments, allowing attacker-controlled GraphQL schema content to inject Python code into generated models that runs when imported. This issue is fixed in version 0.60.1.
Metrics
Weakness Enumeration
Affected Software
Source: CNA advisory (CVE.org). NVD analysis pending.
| Vendor | Product | Versions |
|---|---|---|
| koxudaxi | datamodel-code-generator | >= 0.25.0, < 0.60.1 |
References
Timeline
- Published
- Last Modified
- Status
- Deferred
Frequently Asked Questions
What is CVE-2026-54621?
How severe is CVE-2026-54621?
How do I fix CVE-2026-54621?
How Strix Helps
- How Strix found a critical auth bypass in etcdStrix autonomously discovered a critical authentication bypass in etcd, later designated CVE-2026-33413.
- Autonomous PentestingAI agents that find and validate exploitable vulnerabilities like this one across your applications.
- PR ReviewsPentest every pull request so vulnerable code is caught before it ships to production.
- AI Penetration TestingHow AI-driven penetration testing continuously covers your attack surface.
Related CVEs from 2026
- CVE-2026-54616NanaZip is the 7-Zip derivative intended for the modern Wind…7.1
- CVE-2026-54617GravitLauncher is an open-source Minecraft launcher based on…9.8
- CVE-2026-54618Obsidian Web MCP is a secure remote MCP server for Obsidian …9.4
- CVE-2026-54619sqlite3 provides Ruby bindings for the SQLite3 embedded data…2
- CVE-2026-5462A vulnerability was identified in Wahoo Fitness SYSTM App up…3.3
- CVE-2026-54620sqlite3 provides Ruby bindings for the SQLite3 embedded data…2
- CVE-2026-54622django CMS is an easy-to-use and developer-friendly enterpri…6.5
- CVE-2026-54623django CMS is an easy-to-use and developer-friendly enterpri…7.1
- CVE-2026-54624django CMS is an easy-to-use and developer-friendly enterpri…6.5
- CVE-2026-54625django CMS is a content management system powered by Django.…4.8
- CVE-2026-54626SAIL is a cross-platform library for loading and saving imag…9.8
- CVE-2026-54627SAIL is a cross-platform library for loading and saving imag…9.8
Are you affected by CVE-2026-54621?
Run a free Strix scan to check your systems for this vulnerability.
Scan your code nowSource: NVD / NIST
