{"answers":{"affected":"1 open source package ship an affected version, including datamodel-code-generator.","exploited":"There is no known exploitation of CVE-2026-127208 in the wild and no public exploit code.","exposure":"An affected version is exposed as installed. No special setting or call is needed.","fix":"Upgrade datamodel-code-generator to 0.84.0 or later.","what":"CVE-2026-127208 is a high-severity code injection vulnerability in datamodel-code-generator, published on 12 Nov 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2026-127208 and fix it if it is affected.\n\nWhat it is: CVE-2026-127208 is a high-severity code injection vulnerability in datamodel-code-generator, published on 12 Nov 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2026-127208 in the wild and no public exploit code.\nExposure: An affected version is exposed as installed. No special setting or call is needed.\n\nAffected packages and fixed versions:\n- datamodel-code-generator (PyPI): affected all versions; fixed in 0.84.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-127208/ (Markdown: https://insights.sbomify.com/CVE-2026-127208/index.md)","id":"CVE-2026-127208","markdown":"https://insights.sbomify.com/CVE-2026-127208/index.md","name":"CVE-2026-127208","record":{"aliases":["GHSA-5hqf-87jh-5c5q"],"analysis":{"component_type":"developer_tool","exploitable_when_present":false,"fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"Python code generator","requires_auth":"none","requires_specific_call":false,"summary":"A malicious JSON schema can inject Python code into generated models, executing arbitrary code on developer workstations or CI pipelines that import them.","user_interaction":"required","vuln_class":"code_injection","vulnerable_functions":["parse_python_type_annotation","_python_type_expr_from_ast","model_rebuild"]},"analysis_generated_by":"sbomify/insights-2b-fp8","assigner":"VulnCheck","cpe":[],"cvss":{"score":8.6,"severity":"high","source":"cna","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","version":"4.0"},"cwes":[{"id":"CWE-94","name":"Improper Control of Generation of Code"}],"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.","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":false,"headline":"datamodel-code-generator \u003c 0.84.0 Code Injection via x-python-type Annotation","id":"CVE-2026-127208","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"code_injection","year":"2026"},"n_packages":1,"n_references":3,"n_vendor_status":0,"next":{"headline":"Xiaomi Mi Browser \u003c 14.66.0 Path Traversal via ThirdDocViewerActivity","id":"CVE-2026-127209"},"nickname":null,"packages":[{"ecosystem":"PyPI","fixed":["0.84.0"],"introduced":["0"],"last_affected":[],"name_kind":null,"package":"datamodel-code-generator","purl":"pkg:pypi/datamodel-code-generator","purl_source":"cna","scope":"upstream","source":"CVE-2026-127208"}],"prev":{"headline":"Sendcloud for WooCommerce 1.0.41 Missing Authorization via AJAX Actions","id":"CVE-2026-127207"},"products":["datamodel-code-generator"],"published":"2026-11-12","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2026-11-13","vendor_status":[],"vendors":["datamodel-code-generator"]},"summary":"A malicious JSON schema can inject Python code into generated models, executing arbitrary code on developer workstations or CI pipelines that import them.","url":"https://insights.sbomify.com/CVE-2026-127208/"}