Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-63720: Improper Control of Generation of Code ('Code Injection') in koxudaxi datamodel-code-generator

0
High
VulnerabilityCVE-2026-63720cvecve-2026-63720
Published: 07/26/2026 (07/26/2026, 03:51:18 UTC)
Source: CVE Database V5
Vendor/Project: koxudaxi
Product: datamodel-code-generator

Description

datamodel-code-generator versions prior to 0.70.0 contain a code injection vulnerability. An attacker controlling input schemas can supply a malicious customBasePath value that is embedded without validation into a Python import statement, leading to arbitrary code execution when the generated module is imported. This vulnerability allows remote code execution under certain conditions.

CVSS v4.0

Score 7.5high

Attack Vector
Network
Attack Complexity
High
Attack Requirements
None
Privileges Required
None
User Interaction
Active
Vuln. Confidentiality
High
Vuln. Integrity
High
Vuln. Availability
High
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
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 software

datamodel-code-generator
pkg:pypi/datamodel-code-generator
Affected versions
<0.70.0

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/26/2026, 05:22:00 UTC

Technical Analysis

The koxudaxi datamodel-code-generator before version 0.70.0 has a code injection vulnerability (CVE-2026-63720). The issue arises because the tool emits the customBasePath value verbatim into a 'from ... import ...' Python statement without validating that it is a proper identifier. If an attacker controls the input schema, they can craft a customBasePath containing embedded newlines and a dot-free Python expression, which results in arbitrary Python code execution when the generated module is imported. This vulnerability enables remote code execution triggered by malicious input schemas.

Potential Impact

Successful exploitation allows an attacker who controls the input schema to execute arbitrary Python code remotely on the system running datamodel-code-generator. This can lead to full compromise of the environment where the code generation occurs, depending on the privileges of the process. The CVSS 4.0 score is 7.5 (high severity), reflecting network attack vector, high impact on confidentiality, integrity, and availability, and requiring user interaction with high attack complexity.

Mitigation Recommendations

No official patch or remediation is currently confirmed. Users should upgrade to version 0.70.0 or later once available, as the vulnerability affects versions prior to 0.70.0. Until a fix is released, avoid processing untrusted or attacker-controlled input schemas with datamodel-code-generator. Monitor the vendor advisory for updates on patches or official mitigations.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
VulnCheck
Date Reserved
2026-07-17T21:21:58.624Z
Cvss Version
4.0
State
PUBLISHED
Remediation Level
null

Threat ID: 6a6596189c2644c7f8e64e58

Added to database: 07/26/2026, 05:07:36 UTC

Last enriched: 07/26/2026, 05:22:00 UTC

Last updated: 07/26/2026, 06:06:40 UTC

Views: 27

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses