CVE-2026-127208
Last modified
CVE-2026-127208 is a high-severity vulnerability rated 8.8/10 on the CVSS scale. 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.. EPSS estimates a 0.37% chance of exploitation in the next 30 days.
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.
Metrics
Weakness Enumeration
References
Timeline
- Published
- Last Modified
- Status
- Deferred
Frequently Asked Questions
What is CVE-2026-127208?
How severe is CVE-2026-127208?
How do I fix CVE-2026-127208?
How Strix Helps
- How Strix found a critical auth bypass in etcdStrix autonomously discovered a critical authentication bypass in etcd, later designated CVE-2026-33413.
- Autonomous PentestingAI agents that find and validate exploitable vulnerabilities like this one across your applications.
- PR ReviewsPentest every pull request so vulnerable code is caught before it ships to production.
- AI Penetration TestingHow AI-driven penetration testing continuously covers your attack surface.
Related CVEs from 2026
- CVE-2026-12720The Kirki WordPress plugin before 6.0.13 does not restrict …7.5
- CVE-2026-127202MLflow before 3.18.0 using the FileStore backend contains a …5.3
- CVE-2026-127203AppFlowy Cloud through 0.9.64 contains a stored cross-site s…5.4
- CVE-2026-127204WooCommerce PayPal Pro Payment Gateway plugin before 4.1.1 c…7.5
- CVE-2026-127206Image CAPTCHA for Contact Form 7 and WPForms through 3.3.29 …5.3
- CVE-2026-127207Sendcloud for WooCommerce through 1.0.41 contains a missing …5.4
- CVE-2026-127209Xiaomi Mi Browser Android Application (com.mi.globalbrowser)…4
- CVE-2026-12721The Kirki WordPress plugin before 6.0.13 does not properly …8.6
- CVE-2026-127211MultiVendorX plugin for WordPress before 5.0.22 contains a b…6.5
- CVE-2026-127212Dokploy before 0.31.1 contains a missing ownership check vul…4.3
- CVE-2026-12722Missing authentication for critical function vulnerability i…8.2
- CVE-2026-12723The Kirki WordPress plugin before 6.0.12 does not perform a…5.3
Are you affected by CVE-2026-127208?
Run a free Strix scan to check your systems for this vulnerability.
Scan your code nowSource: NVD / NIST
