CVE-2026-63720: Improper Control of Generation of Code ('Code Injection') in koxudaxi datamodel-code-generator
datamodel-code-generator prior to version 0.70.0 contains a code injection vulnerability that allows attackers who control input schemas to achieve remote code execution by supplying a malicious customBasePath value containing embedded newlines and a dot-free Python expression. The crafted value is emitted verbatim into a generated 'from ... import ...' statement without identifier validation, causing arbitrary Python code to execute when the generated module is imported.
AI Analysis
Technical Summary
CVE-2026-63720 is a code injection vulnerability in koxudaxi's datamodel-code-generator before version 0.70.0. Attackers who control the input schema can supply a malicious customBasePath containing embedded newlines and a dot-free Python expression. This crafted input is emitted verbatim into a 'from ... import ...' statement in the generated code without proper identifier validation, enabling arbitrary Python code execution upon module import.
Potential Impact
Successful exploitation allows remote code execution with the privileges of the user running the datamodel-code-generator. This can lead to full system compromise or unauthorized actions depending on the execution context.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, avoid processing untrusted input schemas or sanitize inputs to prevent injection of malicious code into the customBasePath field.
CVE-2026-63720: Improper Control of Generation of Code ('Code Injection') in koxudaxi datamodel-code-generator
Description
datamodel-code-generator prior to version 0.70.0 contains a code injection vulnerability that allows attackers who control input schemas to achieve remote code execution by supplying a malicious customBasePath value containing embedded newlines and a dot-free Python expression. The crafted value is emitted verbatim into a generated 'from ... import ...' statement without identifier validation, causing arbitrary Python code to execute when the generated module is imported.
CVSS v4.0
Score 7.5high
Affected software
pkg:pypi/datamodel-code-generatorRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-63720 is a code injection vulnerability in koxudaxi's datamodel-code-generator before version 0.70.0. Attackers who control the input schema can supply a malicious customBasePath containing embedded newlines and a dot-free Python expression. This crafted input is emitted verbatim into a 'from ... import ...' statement in the generated code without proper identifier validation, enabling arbitrary Python code execution upon module import.
Potential Impact
Successful exploitation allows remote code execution with the privileges of the user running the datamodel-code-generator. This can lead to full system compromise or unauthorized actions depending on the execution context.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, avoid processing untrusted input schemas or sanitize inputs to prevent injection of malicious code into the customBasePath field.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- VulnCheck
- Date Reserved
- 2026-07-17T21:21:58.624Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a6596189c2644c7f8e64e58
Added to database: 07/26/2026, 05:07:36 UTC
Last enriched: 08/13/2026, 13:48:50 UTC
Last updated: 09/08/2026, 22:52:14 UTC
Views: 174
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.