CVE-2026-63720: high-severity vulnerability in koxudaxi datamodel-code-generator
datamodel-code-generator Code Injection via Unvalidated customBasePath Schema Field
Published · Updated
E-mail alert when it lands in KEV, gets a public PoC or its score goes up.
41Vexday Risk Score
No sign of exploitation. It has a public proof of concept.
ssvc Attendcvss 7.5epss 0.7%
from disclosure to weapon8 days
Published on NVDJul 26
1st PoC+8d
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.
Related CVEs — koxudaxi datamodel-code-generator
In the same product, most dangerous first.
CVE-2026-54653HIGH`datamodel-code-generator` vulnerable to code injection in via attacker-controlled `default_factory` schema fieldEPSS 0.7%CVE-2026-55390HIGHArbitrary local file read via XSD `schemaLocation` (`xs:include`/`xs:import`) path traversal, with no remote-ref gateEPSS 0.6%CVE-2026-55389HIGHdatamodel-code-generator vulnerable to arbitrary local file read via JSON-Schema `$ref` (`file://` and `../` traversal), bypassing `--no-allow-remote-refs`EPSS 0.5%CVE-2026-55415HIGHdatamodel-code-generator vulnerable to code injection via `x-python-import` / `customTypePath` in generated import statementsEPSS 0.5%CVE-2026-54690HIGHdatamodel-code-generator vulnerable to SSRF via JSON-Schema `$ref` to HTTP URL (silent by default)EPSS 0.4%CVE-2026-55403LOWdatamodel-code-generator: Authorization / request headers leaked to cross-origin redirect target when fetching remote schemasEPSS 0.3%
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