{"id":"CVE-2026-63720","aliases":["CVE-2026-63720"],"related":[],"kind":"vulnerability","state":"published","title":"datamodel-code-generator Code Injection via Unvalidated customBasePath Schema Field","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","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.","source":"cvelist"},{"lang":"es","text":"datamodel-code-generator anterior a la versión 0.70.0 contiene una vulnerabilidad de inyección de código que permite a los atacantes que controlan los esquemas de entrada lograr la ejecución remota de código al proporcionar un valor customBasePath malicioso que contiene saltos de línea incrustados y una expresión Python sin puntos. El valor manipulado se emite textualmente en una instrucción from ... import ... generada sin validación de identificador, lo que provoca la ejecución de código Python arbitrario cuando se importa el módulo generado.","source":"nvd"}],"published":"2026-07-26T03:51:18.553Z","modified":"2026-10-24T13:10:00.147Z","severity":{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"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","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"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","score":7.5,"rating":"HIGH"},{"scorer":"VulnCheck","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H","score":7.5,"rating":"HIGH"}],"cwes":["CWE-94"],"affected":[{"ranges":[{"type":"custom","introduced":"0","fixed":"0.70.0","status":"affected"}],"vendor":"koxudaxi","product":"datamodel-code-generator","source":"cvelist"}],"references":[{"url":"https://github.com/koxudaxi/datamodel-code-generator/commit/545a96c5","tags":["patch","product"],"sources":["cvelist","nvd"]},{"url":"https://github.com/koxudaxi/datamodel-code-generator","tags":["product"],"sources":["cvelist","nvd"]},{"url":"https://www.vulncheck.com/advisories/datamodel-code-generator-code-injection-via-unvalidated-custombasepath-schema-field","tags":["third-party-advisory"],"sources":["cvelist","nvd"]},{"url":"https://rahulkarne.com/#/cve/CVE-2026-63720","tags":["exploit"],"sources":["cvelist","nvd"]},{"url":"https://github.com/rahulreddykarne/CVE-2026-63720-datamodel-code-generator","tags":["technical-description"],"sources":["cvelist","nvd"]}],"credits":["Rahul Karne"],"assigner":"VulnCheck","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-07-27T14:39:56.122Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-63720","url":"https://www.cve.org/CVERecord?id=CVE-2026-63720","licence":"CVE Terms of Use","modified":"2026-08-14T16:50:34.298Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-63720","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-63720","licence":"Public domain","modified":"2026-10-24T13:10:00.147Z"}],"updatedAt":"2026-11-25T22:59:30.163Z","epss":{"score":0.00751,"percentile":0.56202,"date":"2026-12-01T12:00:22.000Z"}}