{"id":82649,"date":"2026-07-29T01:47:48","date_gmt":"2026-07-28T22:17:48","guid":{"rendered":"https:\/\/afaghhosting.net\/blog\/cve-2026-55415-datamodel-code-generator-vulnerable-to-code-injection-via-x-python-import-customtypepath-in-generated-import-statements\/"},"modified":"2026-07-29T01:47:48","modified_gmt":"2026-07-28T22:17:48","slug":"cve-2026-55415-datamodel-code-generator-vulnerable-to-code-injection-via-x-python-import-customtypepath-in-generated-import-statements","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/cve-2026-55415-datamodel-code-generator-vulnerable-to-code-injection-via-x-python-import-customtypepath-in-generated-import-statements\/","title":{"rendered":"CVE-2026-55415 &#8211; datamodel-code-generator vulnerable to code injection via `x-python-import` \/ `customTypePath` in generated import statements"},"content":{"rendered":"<p>CVE ID :CVE-2026-55415<\/p>\n<p>  Published : July 28, 2026, 10:17 p.m. | 22\u00a0minutes ago<\/p>\n<p>  Description :datamodel-code-generator generates Pydantic v2 models, dataclasses, TypedDict, and msgspec.Struct from OpenAPI, JSON Schema, GraphQL, Avro, Protobuf, and raw JSON, YAML, or CSV. From 0.11.6 until 0.64.0, datamodel-code-generator allows attacker-controlled x-python-import or customTypePath schema extensions to reach src\/datamodel_code_generator\/parser\/jsonschema.py and generated import handling through Import.from_full_path and Imports.create_line in src\/datamodel_code_generator\/imports.py, allowing a newline to break out of an import statement and execute Python code when the generated model is imported. This issue is fixed in version 0.64.0.<\/p>\n<p>  Severity: 7.5 | HIGH<\/p>\n<p>  Visit the link for more details, such as CVSS details, affected products, timeline, and more&#8230;\u00a0<\/p>\n","protected":false},"excerpt":{"rendered":"<p>CVE ID :CVE-2026-55415 Published : July 28, 2026, 10:17 p.m. | 22\u00a0minutes ago Description :datamodel-code-generator generates Pydantic v2 models, dataclasses, TypedDict, and msgspec.Struct from OpenAPI, JSON Schema, GraphQL, Avro, Protobuf, and raw JSON, YAML, or CSV. From 0.11.6 until 0.64.0, datamodel-code-generator allows attacker-controlled x-python-import or customTypePath schema extensions to reach src\/datamodel_code_generator\/parser\/jsonschema.py and generated import handling &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26],"tags":[],"class_list":["post-82649","post","type-post","status-publish","format-standard","hentry","category-vulnerability"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/82649","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/comments?post=82649"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/82649\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=82649"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=82649"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=82649"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}