CVE-2026-55415

Source
https://cve.org/CVERecord?id=CVE-2026-55415
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-55415.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-55415
Aliases
Downstream
Published
2026-07-28T21:37:55Z
Modified
2026-09-14T11:45:28Z
Severity
  • 7.5 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H CVSS Calculator
Summary
datamodel-code-generator vulnerable to code injection via `x-python-import` / `customTypePath` in generated import statements
Details

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.

Database specific
{
    "cna_assigner": "GitHub_M",
    "cwe_ids": [
        "CWE-94",
        "CWE-95"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/55xxx/CVE-2026-55415.json"
}
References

Affected packages

Git / github.com/datamodel-code-generator/datamodel-code-generator

Affected ranges

Type
GIT
Repo
https://github.com/datamodel-code-generator/datamodel-code-generator
Events
Database specific
Show details
{
    "cpe": "cpe:2.3:a:koxudaxi:datamodel-code-generator:*:*:*:*:*:*:*:*",
    "extracted_events": [
        {
            "introduced": "0.11.6"
        },
        {
            "fixed": "0.64.0"
        }
    ],
    "source": [
        "CPE_RANGE",
        "REFERENCES"
    ]
}

Affected versions

0.*
0.11.10
0.11.11
0.11.12
0.11.13
0.11.14
0.11.15
0.11.16
0.11.17
0.11.18
0.11.19
0.11.20
0.11.6
0.11.7
0.11.8
0.11.9
0.12.0
0.12.1
0.12.2
0.12.3
0.13.0
0.13.1
0.13.2
0.13.3
0.13.4
0.13.5
0.14.0
0.14.1
0.15.0
0.16.0
0.16.1
0.17.0
0.17.1
0.17.2
0.18.0
0.18.1
0.19.0
0.20.0
0.21.0
0.21.1
0.21.2
0.21.3
0.21.4
0.21.5
0.22.0
0.22.1
0.23.0
0.24.0
0.24.1
0.24.2
0.25.0
0.25.1
0.25.2
0.25.3
0.25.4
0.25.5
0.25.6
0.25.7
0.25.8
0.25.9
0.26.0
0.26.1
0.26.2
0.26.3
0.26.4
0.26.5
0.27.0
0.27.1
0.27.2
0.27.3
0.28.0
0.28.1
0.28.2
0.28.3
0.28.4
0.28.5
0.29.0
0.30.0
0.30.1
0.30.2
0.31.0
0.31.1
0.31.2
0.32.0
0.33.0
0.34.0
0.35.0
0.36.0
0.37.0
0.38.0
0.39.0
0.40.0
0.41.0
0.42.0
0.42.1
0.42.2
0.43.0
0.43.1
0.44.0
0.45.0
0.46.0
0.47.0
0.48.0
0.49.0
0.50.0
0.51.0
0.52.0
0.52.1
0.52.2
0.53.0
0.54.0
0.54.1
0.55.0
0.56.0
0.56.1
0.57.0
0.58.0
0.59.0
0.59.1
0.60.0
0.60.1
0.60.2
0.61.0
0.62.0
0.63.0

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-55415.json"