datamodel-code-generator Code Injection via Unvalidated customBasePath Schema Field
41Vexday Risk Score
No sign of exploitation. It has a public proof of concept.
ssvc Attendcvss 7.5epss 0.8%
from disclosure to weapon8 days
Published on NVDJul 26
1st PoC+8d
exploitation probability
0.8%top 47% of all CVEs
observed exploitation
nono source reports it
2 public exploit(s)
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.
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
Affected products
koxudaxi · datamodel-code-generatorpublic PoCs found — 2
githubgithub.com/rahulreddykarne/CVE-2026-63720-datamodel-code-generator★ 0cve_referencerahulkarne.com/#/cve/CVE-2026-63720unverified⚠ Public resources, to assess the exposure of systems you control or are authorized to test. Test only with authorization.
References
https://github.com/koxudaxi/datamodel-code-generatorhttps://github.com/koxudaxi/datamodel-code-generator/commit/545a96c5https://github.com/rahulreddykarne/CVE-2026-63720-datamodel-code-generatorhttps://rahulkarne.com/#/cve/CVE-2026-63720https://www.vulncheck.com/advisories/datamodel-code-generator-code-injection-via-unvalidated-custombasepath-schema-field