Code Execution Vulnerability in datamodel-code-generator
CVE-2026-54656
7.8HIGH
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
