CVE-2026-63720
published high CVSS 4.0 · 7.5datamodel-code-generator Code Injection via Unvalidated customBasePath Schema Field
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| koxudaxi | — | datamodel-code-generator0 to < 0.70.0 · Other versions: affected | Affected | Not stated | VulnCheck |
| SUSE / openSUSE | openSUSE-Tumbleweed | python313-datamodel-code-generatoraarch64 | Advisory build | 0.72.3-1.1 | OPENSUSE-SU-2026:11538-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python313-datamodel-code-generatorppc64le | Advisory build | 0.72.3-1.1 | OPENSUSE-SU-2026:11538-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python313-datamodel-code-generators390x | Advisory build | 0.72.3-1.1 | OPENSUSE-SU-2026:11538-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python313-datamodel-code-generatorx86_64 | Advisory build | 0.72.3-1.1 | OPENSUSE-SU-2026:11538-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python314-datamodel-code-generatoraarch64 | Advisory build | 0.72.3-1.1 | OPENSUSE-SU-2026:11538-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python314-datamodel-code-generatorppc64le | Advisory build | 0.72.3-1.1 | OPENSUSE-SU-2026:11538-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python314-datamodel-code-generators390x | Advisory build | 0.72.3-1.1 | OPENSUSE-SU-2026:11538-1 |
Show 1 more entries
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| SUSE / openSUSE | openSUSE-Tumbleweed | python314-datamodel-code-generatorx86_64 | Advisory build | 0.72.3-1.1 | OPENSUSE-SU-2026:11538-1 |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 4.0
- Base score
- 7.5 / 10
- Severity
- high
- Provider
- VulnCheck · cna
- Vector string
- 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
- Scenarios
- en: GENERAL
Additional Assessments
| Version | Score | Severity | Provider | Vector | Scenarios |
|---|---|---|---|---|---|
| 3.1 | 7.5 | high | VulnCheck · cna | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H | en: GENERAL |
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| koxudaxi | datamodel-code-generator | 0 to < 0.70.0 (affected · custom)Default: affected | VulnCheck · cna |
Weaknesses
1- CWE-94 Improper Control of Generation of Code ('Code Injection')
References
5- Product https://github.com/koxudaxi/datamodel-code-generator
- Patch Commit https://github.com/koxudaxi/datamodel-code-generator/commit/545a96c5
- https://github.com/rahulreddykarne/CVE-2026-63720-datamodel-code-generator
- Blog Post https://rahulkarne.com/#/cve/CVE-2026-63720
- https://www.vulncheck.com/advisories/datamodel-code-generator-code-injection-via-unvalidated-custombasepath-schema-field
Provider assertions
2VulnCheck · cna
datamodel-code-generator Code Injection via Unvalidated customBasePath Schema Field
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- d79a8b3099666cdb7089e439bbe5e0f71a344eb405a118da10826791dc180a73
- Ingested
- 23 Sep 2026, 09:25:23 UTC
- Source record
- Official CVE record