Mend.io Vulnerability Database
The largest open source vulnerability database
What is a Vulnerability ID?
New vulnerability? Tell us about it!
CVE-2026-127208
Published:November 12, 2026
Updated:November 13, 2026
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.
Affected Packages
datamodel-code-generator (CONDA):
Affected version(s) >=0.51.0 <0.84.0
Fix Suggestion:
Update to version 0.84.0
https://github.com/datamodel-code-generator/datamodel-code-generator.git (GITHUB):
Affected version(s) >=0.51.0 <0.84.0
Fix Suggestion:
Update to version 0.84.0
datamodel-code-generator (PYTHON):
Affected version(s) >=0.51.0 <0.84.0
Fix Suggestion:
Update to version 0.84.0
Additional Notes
The description of this vulnerability differs from MITRE.
Do you need more information?
Contact Us
CVSS v4
Base Score:
8.6
Attack Vector
NETWORK
Attack Complexity
LOW
Attack Requirements
NONE
Privileges Required
NONE
User Interaction
ACTIVE
Vulnerable System Confidentiality
HIGH
Vulnerable System Integrity
HIGH
Vulnerable System Availability
HIGH
Subsequent System Confidentiality
NONE
Subsequent System Integrity
NONE
Subsequent System Availability
NONE
CVSS v3
Base Score:
8.8
Attack Vector
NETWORK
Attack Complexity
LOW
Privileges Required
NONE
User Interaction
REQUIRED
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
HIGH
Availability
HIGH
Weakness Type (CWE)
Improper Control of Generation of Code
EPSS
Base Score:
0.37