{"id":"CVE-2026-63720","aliases":["EUVD-2026-49050","GHSA-7x49-hhjc-29rg","openSUSE-SU-2026:11538-1"],"status":"published","title":"datamodel-code-generator Code Injection via Unvalidated customBasePath Schema Field","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.","severity":{"version":"4.0","score":7.5,"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","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-12","score":0.00737,"percentile":0.5501,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":true,"fix_available":false},"cwes":["CWE-94"],"published":"2026-07-26T03:51:18Z","modified":"2026-10-28T02:31:10Z","exploits":[{"source":"pocgithub","id":"rahulreddykarne/CVE-2026-63720-datamodel-code-generator","title":"rahulreddykarne/CVE-2026-63720-datamodel-code-generator","date":"2026-08-03","url":"https://github.com/rahulreddykarne/CVE-2026-63720-datamodel-code-generator"}],"affected":[{"source":"osv","ecosystem":"openSUSE:Tumbleweed","package":"python-datamodel-code-generator","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.72.3-1.1"}]}],"bundled":3}],"products":[{"vendor":"koxudaxi","product":"datamodel-code-generator"}],"references":[{"url":"https://github.com/koxudaxi/datamodel-code-generator/commit/545a96c5","tags":["product","patch","fix"]},{"url":"https://github.com/koxudaxi/datamodel-code-generator","tags":["product","package"]},{"url":"https://www.vulncheck.com/advisories/datamodel-code-generator-code-injection-via-unvalidated-custombasepath-schema-field","tags":["third-party-advisory","advisory"]},{"url":"https://rahulkarne.com/#/cve/CVE-2026-63720","tags":["exploit","evidence"]},{"url":"https://github.com/rahulreddykarne/CVE-2026-63720-datamodel-code-generator","tags":["technical-description","article"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-63720","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-7x49-hhjc-29rg"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/63xxx/CVE-2026-63720.json","tags":["advisory"]},{"url":"","tags":["advisory"]},{"url":"https://www.suse.com/security/cve/CVE-2026-55391","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2026-55403","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2026-63720","tags":["web"]}],"sources":{"cve":[{"id":"CVE-2026-63720","title":"datamodel-code-generator Code Injection via Unvalidated customBasePath Schema Field","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.","status":"published","published":"2026-07-26T03:51:18.553Z","modified":"2026-08-14T16:50:34.298Z","cvss":[{"version":"4.0","score":7.5,"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","level":"high","assessor":"cna"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high","assessor":"cna"}],"cwes":["CWE-94"],"updated_at":"2026-11-02T14:19:55.914391Z"}],"euvd":[{"id":"EUVD-2026-49050","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.","status":"published","published":"2026-07-26T03:51:18Z","modified":"2026-08-14T16:50:34Z","cvss":[{"version":"4.0","score":7.5,"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","level":"high"}],"updated_at":"2026-11-02T18:01:54.232317Z"}],"ghsa":[{"id":"GHSA-7x49-hhjc-29rg","title":"datamodel-code-generator prior to version 0.70.0 contains a code injection vulnerability that...","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.","status":"published","published":"2026-07-26T06:31:26Z","modified":"2026-07-26T06:31:31Z","cvss":[{"version":"4.0","score":7.5,"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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"high"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high"}],"cwes":["CWE-94"],"updated_at":"2026-11-02T15:09:49.369416Z"}],"nvd":[{"id":"CVE-2026-63720","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.","status":"published","published":"2026-07-26T05:16:23.927Z","modified":"2026-10-24T13:10:00.147Z","cvss":[{"version":"4.0","score":7.5,"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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"high","assessor":"secondary"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high","assessor":"secondary"}],"cwes":["CWE-94"],"updated_at":"2026-11-02T14:12:32.830533Z"}],"osv":[{"id":"CVE-2026-63720","title":"datamodel-code-generator Code Injection via Unvalidated customBasePath Schema Field","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.","status":"published","published":"2026-07-26T03:51:18.553Z","modified":"2026-10-28T02:31:10.397508181Z","cvss":[{"version":"4.0","score":7.5,"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","level":"high"}],"cwes":["CWE-94"],"updated_at":"2026-11-02T15:45:13.306117Z"},{"id":"openSUSE-SU-2026:11538-1","title":"python313-datamodel-code-generator-0.72.3-1.1 on GA media","description":"These are all security issues fixed in the python313-datamodel-code-generator-0.72.3-1.1 package on the GA media of openSUSE Tumbleweed.","status":"published","published":"2026-08-18T00:00:00Z","modified":"2026-08-19T18:23:34.339197217Z","updated_at":"2026-11-02T16:58:39.516824Z"}]}}
