Server-Side Request Forgery Vulnerability in Datamodel Code Generator by Koxudaxi
CVE-2026-54691
8.2HIGH
What is CVE-2026-54691?
The Datamodel Code Generator, used for generating Python data models from schema definitions, is vulnerable to server-side request forgery (SSRF) due to its handling of URLs in the http.get_body function within the http.py module. This vulnerability allows attackers to send specially crafted requests that can access loopback, private, and link-local network resources without proper host or IP address validation. This flaw has been addressed in version 0.61.0, making it crucial for users to upgrade to mitigate potential security risks.
Affected Version(s)
datamodel-code-generator >= 0.9.1, < 0.61.0
