Skip to main content
CVE-2026-127208VulnerabilityPublished

datamodel-code-generator before 0.84.0 contains a code injection vulnerability that allows attackers to achieve

Source GCVE Database

0
Compare
Authoritative record:CVE-2026-127208· High 8.6

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

Data as of 12 Nov 2026, 22:23 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

A fix is available in datamodel-code-generator version 0.84.0 and later. Users should upgrade to version 0.84.0 or newer to remediate this vulnerability. Until patched, avoid processing untrusted JSON Schemas with x-python-type annotations or running generated models in sensitive environments.

Description

datamodel-code-generator versions before 0.84.0 contain a code injection vulnerability. This flaw allows attackers to execute arbitrary code by providing a malicious JSON Schema with a specially crafted x-python-type annotation. The vulnerability arises because the validation functions parse_python_type_annotation and _python_type_expr_from_ast can be bypassed, enabling malicious Python expressions to be embedded and later evaluated by Pydantic v2 during model rebuilding. This can lead to arbitrary code execution on developer machines, CI/CD pipelines, or runtime environments that generate and import these models.

References

Community reviews

Loading reviews…