{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2026-127208","id":"CVE-2026-127208","title":"datamodel-code-generator code execution via JSON Schema annotation","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 malicio","descriptionLong":"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.","published":"2026-11-12T20:58:59.634Z","updated":"2026-11-15T02:30:58.816167669Z","reserved":"2026-11-12T16:30:10.903Z","status":"Deferred","rejected":false,"assigner":"VulnCheck","metric":{"version":"4.0","score":8.6,"vector":"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","rating":"high","source":"VulnCheck"},"metrics":[{"version":"4.0","score":8.6,"vector":"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","rating":"high","source":"VulnCheck"},{"version":"4.0","score":8.6,"vector":"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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","rating":"high","source":"vulncheck.com"},{"version":"4.0","score":null,"vector":"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","rating":"unrated","source":"OSV"},{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","rating":"high","source":"VulnCheck"},{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","rating":"high","source":"vulncheck.com"}],"rating":"high","products":["datamodel-code-generator"],"affectedProducts":[{"vendor":"datamodel-code-generator","product":"datamodel-code-generator","defaultStatus":"unaffected","versions":[{"status":"affected","version":"0","versionType":"semver","lessThan":"0.84.0"}],"platforms":[]}],"packages":[],"cwes":["CWE-94"],"aliases":[],"references":[{"url":"https://github.com/datamodel-code-generator/datamodel-code-generator/releases/tag/0.84.0","tags":["release-notes","advisory"]},{"url":"https://github.com/datamodel-code-generator/datamodel-code-generator/commit/ebfc11d0644d37a71374b28aac06d98748e584ec","tags":["patch","issue-tracking","fix"]},{"url":"https://www.vulncheck.com/advisories/datamodel-code-generator-code-injection-via-x-python-type-annotation","tags":["third-party-advisory","advisory"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/127xxx/CVE-2026-127208.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-127208","tags":["advisory"]},{"url":"https://github.com/datamodel-code-generator/datamodel-code-generator","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total"},"epss":0.00371,"epssPercentile":0.31882,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-127208","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-127208","ok":true,"note":"Deferred"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2026-127208","ok":true,"note":"0 packages"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-127208","ok":true,"note":"scored 2026-11-20"}],"aiTitle":true,"tech":[],"critical":[],"attention":null}