Skip to content
OpenAdvisories
High · 7.5 Public exploit CVE-2026-63720 EUVD-2026-49050GHSA-7x49-hhjc-29rg

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

Published Jul 26, 2026 · Updated Aug 14, 2026 · 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.

Affected products

VendorProductAffectedFixed
koxudaxi datamodel-code-generator < 0.70.0 0.70.0

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
openSUSE Tumbleweed python-datamodel-code-generator 0.72.3-1.1 openSUSE-SU-2026:11538-1

Public exploits

Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.

Third-party code, not reviewed by us. Public PoCs are sometimes fake or contain malware. Read the code first and run it only in an isolated lab, against systems you are authorised to test.

GitHub 1 repository

Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.

Advisories 1

References