# CVE-2026-63720: datamodel-code-generator Code Injection via Unvalidated customBasePath Schema Field

- Severity: High 7.5 (CVSS:4.0, scored by VulnCheck) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.75%, higher than 56% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-07-26T03:51:18.553Z
- Modified: 2026-10-24T13:10:00.147Z
- Weaknesses: CWE-94
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: VulnCheck

## 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.

(As written by CVE List.)

## Affected

- koxudaxi datamodel-code-generator: before 0.70.0

## Every score

- VulnCheck: CVSS:4.0 7.5 High `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`
- VulnCheck: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H`

## References

- <https://rahulkarne.com/#/cve/CVE-2026-63720> (exploit)
- <https://github.com/koxudaxi/datamodel-code-generator/commit/545a96c5> (patch, product)
- <https://github.com/koxudaxi/datamodel-code-generator> (product)
- <https://www.vulncheck.com/advisories/datamodel-code-generator-code-injection-via-unvalidated-custombasepath-schema-field> (third-party-advisory)
- <https://github.com/rahulreddykarne/CVE-2026-63720-datamodel-code-generator> (technical-description)

## Sources

- CVE List: [CVE-2026-63720](https://www.cve.org/CVERecord?id=CVE-2026-63720), CVE Terms of Use, modified 2026-08-14
- NVD: [CVE-2026-63720](https://nvd.nist.gov/vuln/detail/CVE-2026-63720), Public domain, modified 2026-10-24

---

Page: https://cve.day/CVE-2026-63720 · Whole record: https://cve.day/CVE-2026-63720.json · Rebuilt by cve.day 2026-11-25T22:59:30.163Z
