SecurityContext

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

IdName
CWE-94Improper Control of Generation of Code

Public exploits

UrlSourceAdded date
https://github.com/koxudaxi/datamodel-code-generator/security/advisories/GHSA-5578-w22f-pfx9nvd2026-07-28

References

Same in every row:

  • Source: nvd
UrlTags
https://github.com/koxudaxi/datamodel-code-generator/commit/577d49569c2254c371a97e495020ae2238a73b84Patch
https://github.com/koxudaxi/datamodel-code-generator/security/advisories/GHSA-5578-w22f-pfx9Exploit, Vendor Advisory
https://github.com/koxudaxi/datamodel-code-generator/releases/tag/0.64.0Release Notes

Products

ProductAffectedPlatform boundSourcesUrl
koxudaxi:datamodel-code-generator>= 0.11.6, < 0.64.0nonvd/v1/products/koxudaxi/datamodel-code-generator

Projects

RepositoryLink kindsIndexedUrl
koxudaxi/datamodel-code-generatorcommit, fix, package, releases, security_advisoryyes/v1/repositories/koxudaxi/datamodel-code-generator
datamodel-code-generator/datamodel-code-generatorfixyes/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