Read the docs
TI-2026-45311 Aliases CVE-2026-63720GHSA-7x49-hhjc-29rg

datamodel-code-generator Code Injection via Unvalidated customBasePath Schema Field

Priority LOW 36CWE-94Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
Active
Attack complexity
High
Attack requirements
None
Impact type
Code execution
Confidentiality · integrity · availability
High · High · High
Fix status
Fixed

Attack profile from CVSS 4.0 · CNA. Fix status from CNA. Impact type from CWE-94.

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.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.00737 54th percentileScored 2026-11-07
Public exploit Yes 1 exploit referenceTagged by the CNA
Fix Fixed datamodel-code-generator (koxudaxi): 0.70.0

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
No
Technical impact
Total

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
koxudaxidatamodel-code-generatorbefore 0.70.00.70.0Patch availableCNA
  • datamodel-code-generator Vendorkoxudaxi Affected before 0.70.0 Fixed in 0.70.0 Patch available CNA

CPE names Threatist (inferred) · 1

Inferred from how NVD named this product before; not given by a source.

CPEVersionsRoleVendor
cpe:2.3:a:koxudaxi:datamodel-code-generator:*:*:*:*:*:*:*:*——koxudaxi
  • cpe:2.3:a:koxudaxi:datamodel-code-generator:*:*:*:*:*:*:*:* Versions — — ·koxudaxi

Remediation

  • Fix · CNA datamodel-code-generator (koxudaxi) Fixed in 0.70.0

Timeline

  1. 2026-10-02 Threatist record created from CVE-2026-63720
  2. 2026-10-03 Alias added: GHSA-7x49-hhjc-29rg

References

  • TI-2026-84481 Code injection in fastapi-code-generator via OpenAPI route paths CVSS 4.0CRITICAL 9.3
  • TI-2026-84480 Code injection in fastapi-code-generator route docstrings CVSS 4.0CRITICAL 9.3
  • TI-2026-39961 Arbitrary local file read via XSD `schemaLocation` (`xs:include`/`xs:import`) path traversal, with no remote-ref gate CVSS 3.1HIGH 7.5
  • TI-2026-39960 Information disclosure in koxudaxi datamodel-code-generator CVSS 3.1HIGH 7.5
  • TI-2026-39512 datamodel-code-generator vulnerable to SSRF via --url: no host/IP validation, follows redirects CVSS 3.1HIGH 8.2
  • TI-2026-39511 datamodel-code-generator vulnerable to SSRF via JSON-Schema `$ref` to HTTP URL (silent by default) CVSS 3.1HIGH 8.2
See all 15 →

Sources