CVE Catalog

CVE-2026-63720

HighCVSS 7.5
Published: Updated: Translated: NVD NIST

Exploitation Probability (EPSS)

Low risk
0.42%

35th percentile - higher than 35% of all known CVEs

Summary

The datamodel-code-generator prior to version 0.70.0 contains a code injection vulnerability. Attackers controlling input schemas can achieve remote code execution by supplying a malicious customBasePath value with 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.

Risk Assessment

Risk of remote code execution (RCE) on servers using this tool for code generation from schemas. An attacker could take over the system.

Recommendation

Update datamodel-code-generator to version 0.70.0 or later. Do not use untrusted input schemas without prior validation.

Other vulnerabilities in datamodel-code-generator

See all
Original NVD description (English source)

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.

Vulnerability data from NVD (NIST) · CISA KEV · EPSS