Code Execution Vulnerability in datamodel-code-generator
CVE-2026-54656

7.8HIGH

Key Information:

Vendor

Koxudaxi

Vendor
CVE Published:
28 July 2026

What is CVE-2026-54656?

A vulnerability exists in versions 0.52.1 to 0.60.2 of datamodel-code-generator that allows unsafe interpolation of validators, leading to potential arbitrary Python code execution upon importing the generated Pydantic v2 model. The issue arises from the interpolation that does not ensure secure validation, exposing applications built on this tool to serious security risks. The vulnerability has been addressed in version 0.60.2.

Affected Version(s)

datamodel-code-generator >= 0.52.1, < 0.60.2

References

CVSS V3.1

Score:
7.8
Severity:
HIGH
Confidentiality:
High
Integrity:
High
Availability:
High
Attack Vector:
Local
Attack Complexity:
Low
Privileges Required:
None
User Interaction:
Required
Scope:
Unchanged

Timeline

  • Vulnerability published

  • Vulnerability Reserved

.