WhatCyber

WhatCyber / Vulnerabilities / CVE-2026-127208

CVE-2026-127208

HIGH severity

CVE-2026-127208 is a publicly disclosed vulnerability recorded in the National Vulnerability Database (NVD). It is not currently listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. Its CVSS base score is 8.8 (high). The EPSS model puts the chance of exploitation in the next 30 days at 0.4%.

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.

Key facts

CVSS v3
8.8 (HIGH)
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Published
2026-11-12
Last modified
2026-11-13
NVD status
Deferred

Timeline

Weaknesses (CWE)

References

More on WhatCyber