CVE-2026-55415: datamodel-code-generator - Code Injection
- Cve: CVE-2026-55415
- Name: datamodel-code-generator - Code Injection
- 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.
- Impact: Attackers can execute arbitrary Python code when importing generated models, potentially leading to full system compromise.
- Remediation: Upgrade to version 0.64.0 or later.
- Vulnerability type: code_injection
- Vulnerability impact: remote_code_execution
- Requirement type: none
- Labels source: projectdiscovery
- Severity: high
- Cvss score: 7.5
- Cvss vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
- Epss score: 0.00488
- Epss percentile: 0.4286
- Assignee: [email protected]
- Published at: 2026-07-28T22:17:48Z
- Age in days: 119
- Modified at: 2026-10-23T23:10:00Z
- Patch available: yes
- Public exploits total: 1
- References total: 3
- Products total: 1
- Oss: yes
- Projects total: 2
- Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2026-55415
- Nvd status: analyzed
- Checked, none or zero: known exploited entries, nuclei templates, public exploits capped, rejected by nvd
- Not known: requirements, hackerone
Cwe
| Id | Name |
|---|---|
| CWE-94 | Improper Control of Generation of Code |
Public exploits
| Url | Source | Added date |
|---|---|---|
| https://github.com/koxudaxi/datamodel-code-generator/security/advisories/GHSA-5578-w22f-pfx9 | nvd | 2026-07-28 |
References
Same in every row:
- Source: nvd
Products
| Product | Affected | Platform bound | Sources | Url |
|---|---|---|---|---|
| koxudaxi:datamodel-code-generator | >= 0.11.6, < 0.64.0 | no | nvd | /v1/products/koxudaxi/datamodel-code-generator |
Projects
| Repository | Link kinds | Indexed | Url |
|---|---|---|---|
| koxudaxi/datamodel-code-generator | commit, fix, package, releases, security_advisory | yes | /v1/repositories/koxudaxi/datamodel-code-generator |
| datamodel-code-generator/datamodel-code-generator | fix | yes | /v1/repositories/datamodel-code-generator/datamodel-code-generator |
Index
- Repositories: 28
- Repositories high signal: 22
- Packages: 1
Exploitation
- Public exploit: yes
- Public exploit count: 1
- Public exploit first date: 2026-07-28
- Remote: yes
- Checked, none or zero: known exploited, known exploited by, exploitation seen, initial access, authentication required
- Not known: known exploited since, vulncheck known exploited since, nuclei template, initial access since, hackerone reports, exposed hosts