StraitOfVuln
Latest / CVE-2026-127208

CVE-2026-127208

HighCVSS 8.8 (v3.1)Deferred
CVE.org ↗NVD ↗

Description

datamodel-code-generator before 0.84.0 contains a code injection vulnerability that allows attackers to achieve arbitrary code execution by supplying a malicious JSON Schema with a crafted x-python-type annotation containing a string ast.Constant node in a subscript slice position, which bypasses validation in parse_python_type_annotation and _python_type_expr_from_ast. Attackers can embed malicious Python expressions such as __import__ calls within quoted string literals in the generated source code, which Pydantic v2 evaluates as a ForwardRef via eval() during model_rebuild(), resulting in arbitrary code execution on developer workstations, CI/CD pipelines, or applications that generate and import the produced models at runtime.

Details

CVE ID
CVE-2026-127208
Published / updated
12 Nov 2026, 21:17 UTC · last modified 13 Nov 2026, 17:17 UTC
Severity
HIGH
CVSS score
8.8 · v3.1 · CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H · Attack vector: Network
Affected vendor
datamodel-code-generator
Affected products
datamodel-code-generator
Affected versions
datamodel-code-generator: before 0.84.0
From the publisher's (CNA) CVE record. NVD analysis is pending.
Fixed versions
datamodel-code-generator 0.84.0
Exploitation status
Not in CISA KEV (no confirmed exploitation recorded)
EPSS
0.46% probability of exploitation in the next 30 days · 42% percentile (03 Dec 2026)
Weakness
Remediation
See the vendor advisory below.
Source (CNA)
disclosure@vulncheck.com