Skip to main content
VulnerabilityPublished

CVE-2026-127208: datamodel-code-generator · Code Injection

Affects datamodel-code-generatorSource CVE Database V5

0
Compare

Not known to be exploited · CVSS 8.6 High : upgrade to 0.84.0 soon.

Data as of 12 Nov 2026, 21:22 UTC

CVSS 4.0 base score
8.6High
How severe the flaw is on the 0–10 CVSS scale.

Thin evidence

One scorer or none
CVSS scores by source
CNA (VulnCheck)CVSS 4.08.6
CNA (VulnCheck)CVSS 3.18.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:N

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 12 Nov 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq 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

ProductAffectedFixed in
datamodel-code-generatordatamodel-code-generatorAffected
  • <0.84.0
Fixed in
  • 0.84.0
PyPIdatamodel-code-generatorpkg:pypi/datamodel-code-generatorOther threatsAffected
  • <0.84.0
Fixed in
  • 0.84.0

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

Community reviews

Loading reviews…