{"id":"CVE-2026-63720","summary":"datamodel-code-generator Code Injection via Unvalidated customBasePath Schema Field","details":"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.","modified":"2026-07-29T03:30:21.715007470Z","published":"2026-07-26T03:51:18.553Z","database_specific":{"cwe_ids":["CWE-94"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/63xxx/CVE-2026-63720.json","cna_assigner":"VulnCheck"},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/63xxx/CVE-2026-63720.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-63720"},{"type":"ADVISORY","url":"https://www.vulncheck.com/advisories/datamodel-code-generator-code-injection-via-unvalidated-custombasepath-schema-field"},{"type":"FIX","url":"https://github.com/koxudaxi/datamodel-code-generator/commit/545a96c5"},{"type":"PACKAGE","url":"https://github.com/koxudaxi/datamodel-code-generator"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/koxudaxi/datamodel-code-generator","events":[{"introduced":"0"},{"fixed":"545a96c5"}],"database_specific":{"extracted_events":[{"introduced":"0"},{"fixed":"0.70.0"}],"source":["AFFECTED_FIELD","REFERENCES"]}}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-63720.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V4","score":"CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"}]}