Skip to main content
← All vulnerabilities
CVE-2026-63720

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

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 0.70.0
1 proof of concept on GitHub
  • Exploitation: none
  • Automatable: no
  • Technical impact: total

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.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: none · Automatable: no · Technical impact: total

  3. Record last updated

Affected versions

  • koxudaxi datamodel-code-generator

    fixed in 0.70.0

References 5

GitHub · koxudaxi/datamodel-code-generator

vulncheck.com

rahulkarne.com

GitHub · rahulreddykarne/CVE-2026-63720-datamodel-code-generator