CVE-2026-127208: datamodel-code-generator · Code Injection
Affects datamodel-code-generatorSource CVE Database V5
Not known to be exploited · CVSS 8.6 High : upgrade to 0.84.0 soon.
Data as of 12 Nov 2026, 21:22 UTC
Thin evidence
One scorer or none| CNA (VulnCheck) | CVSS 4.0 | 8.6 |
|---|---|---|
| CNA (VulnCheck) | CVSS 3.1 | 8.8 |
- Patch
- Available – fixed in 0.84.0
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:NExploitation evidence
Disclosed: evidence found.
CVE published 12 Nov 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 12 Nov 2026.
What to do
Upgrade datamodel-code-generator to 0.84.0.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| datamodel-code-generatordatamodel-code-generator | Affected
| Fixed in
|
PyPIdatamodel-code-generatorpkg:pypi/datamodel-code-generatorOther threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
Upgrade datamodel-code-generator to version 0.84.0 or later, where this vulnerability is fixed.
Description
datamodel-code-generator versions before 0.84.0 contain a code injection vulnerability that allows attackers to execute arbitrary code by providing a malicious JSON Schema with a crafted x-python-type annotation. This annotation bypasses validation and results in malicious Python expressions being evaluated during model rebuilding in Pydantic v2, leading to code execution on developer machines, CI/CD pipelines, or runtime environments that generate and import these models.
References
- github.com/datamodel-code-generator/datamodel-code-generator/releases/tag/0.84.0 (opens in a new tab)
- github.com/datamodel-code-generator/datamodel-code-generator/commit/ebfc11d0644d37a71374b28aac06d98748e584ec (opens in a new tab)
- vulncheck.com/advisories/datamodel-code-generator-code-injection-via-x-python-type-annotation (opens in a new tab)