{"id":"CVE-2026-63720","published":"2026-07-26T03:51:18Z","modified":"2026-08-14T16:50:34Z","title":"datamodel-code-generator Code Injection via Unvalidated customBasePath Schema Field","vendor":"koxudaxi","product":"datamodel-code-generator","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.5,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00737,"percentile":0.50556,"provenance":"source"},"cwes":[{"id":"CWE-94","name":"Improper Control of Generation of Code"}],"references":[{"url":"https://github.com/koxudaxi/datamodel-code-generator/commit/545a96c5","tags":["product","patch"]},{"url":"https://github.com/koxudaxi/datamodel-code-generator","tags":["product"]},{"url":"https://www.vulncheck.com/advisories/datamodel-code-generator-code-injection-via-unvalidated-custombasepath-schema-field","tags":["third-party-advisory"]},{"url":"https://rahulkarne.com/#/cve/CVE-2026-63720","tags":["exploit"]},{"url":"https://github.com/rahulreddykarne/CVE-2026-63720-datamodel-code-generator","tags":["technical-description"]}],"priority":{"score":20.4,"factors":[{"name":"EPSS percentile","points":10.11},{"name":"Public exploit code","points":5.0},{"name":"CVSS severity","points":5.25}]},"exploitSources":{"pocGithub":{"count":1,"skipped":0,"earliest":"2026-08-03","earliestUrl":"https://github.com/rahulreddykarne/CVE-2026-63720-datamodel-code-generator","repos":[{"name":"rahulreddykarne/CVE-2026-63720-datamodel-code-generator","url":"https://github.com/rahulreddykarne/CVE-2026-63720-datamodel-code-generator","stars":0,"created":"2026-08-03"}]},"first":{"date":"2026-08-03","source":"PoC-in-GitHub","url":"https://github.com/rahulreddykarne/CVE-2026-63720-datamodel-code-generator"},"provenance":"source"},"vendorSlug":"koxudaxi","affectedVersions":[{"vendor":"koxudaxi","product":"datamodel-code-generator","versions":["< 0.70.0"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2026-07-27T14:39:56.122239Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2026-49050","exploited":false,"provenance":"source"},"exploitRefs":["https://rahulkarne.com/#/cve/CVE-2026-63720"]}