CVE-2026-63720 Details
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.
A code injection vulnerability has been identified in datamodel-code-generator versions prior to 0.70.0. This vulnerability allows remote code execution by exploiting the 'customBasePath' schema field. Attackers can inject a malicious value that includes newlines and a dot-free Python expression. The injected code is then executed when the generated module is imported, as the value is inserted directly into an import statement without proper validation.
Users can upgrade to datamodel-code-generator version 0.70.0 or later to address this vulnerability.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Jul 26, 2026CISA-ADP
Assessed Jul 27, 2026References 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-ID | CWE Name | Source |
|---|---|---|
| CWE-94 | Improper Control of Generation of Code ('Code Injection') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| koxudaxi datamodel-code-generator | < 0.70.0 (semver) |
CPE
Remediation
| |
Change History
3 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Aug 12, 2026 | CVE Modified | [email protected] |
| Jul 27, 2026 | CVE Modified | CISA-ADP |
| Jul 26, 2026 | New CVE Received | [email protected] |
Volerion