{"cve":"CVE-2026-55415","nvd":{"published":"2026-07-28T22:17:48.983","modified":"2026-10-23T23:10:00.157","status":"Analyzed","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.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H","score":7.5},"cwes":["CWE-94","CWE-95"],"references":["https://github.com/koxudaxi/datamodel-code-generator/commit/577d49569c2254c371a97e495020ae2238a73b84","https://github.com/koxudaxi/datamodel-code-generator/releases/tag/0.64.0","https://github.com/koxudaxi/datamodel-code-generator/security/advisories/GHSA-5578-w22f-pfx9","https://github.com/koxudaxi/datamodel-code-generator/security/advisories/GHSA-5578-w22f-pfx9"],"products":["koxudaxi:datamodel-code-generator"],"source":"nvd","synced_at":"2026-10-24T16:53:27.712498749+00:00"},"epss":{"cve":"CVE-2026-55415","score":0.00488,"percentile":0.41732,"date":"2026-10-25"},"kev":null,"osv":[{"id":"GHSA-5578-w22f-pfx9","url":"https://osv.dev/vulnerability/GHSA-5578-w22f-pfx9","summary":"datamodel-code-generator vulnerable to code injection via `x-python-import` / `customTypePath` in generated import statements","modified":"2026-09-10T03:50:12.317196824Z","packages":[{"ecosystem":"PyPI","name":"datamodel-code-generator","purl":"pkg:pypi/datamodel-code-generator","ranges":[">=0.11.6 <0.64.0"],"fixed":["0.64.0"]}]},{"id":"PYSEC-2026-3557","url":"https://osv.dev/vulnerability/PYSEC-2026-3557","summary":"datamodel-code-generator vulnerable to code injection via `x-python-import` / `customTypePath` in generated import statements","modified":"2026-08-04T14:30:26.265407975Z","packages":[{"ecosystem":"PyPI","name":"datamodel-code-generator","purl":"pkg:pypi/datamodel-code-generator","ranges":[">=0.11.6 <0.64.0"],"fixed":["0.64.0"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}