CVE-2026-54691

datamodel-code-generator vulnerable to SSRF via --url: no host/IP validation, follows redirects

State
Published
Severity
8.2 High
Published
Jul 28, 2026
Updated
Jul 29, 2026
Reserved
Jun 15, 2026

Read the record on cve.org

Description

datamodel-code-generator generates Python data models from schema definitions. From 0.9.1 until 0.61.0, src/datamodel_code_generator/http.py http.get_body accepts --url targets and redirect chain targets without host/IP validation, allowing server-side request forgery against loopback, private, link-local, metadata, and other network-accessible resources. This issue is fixed in version 0.61.0.

Scores

CVSSScoreVectorSource
3.18.2 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:NGitHub_M

Weaknesses

  • CWE-918 Server-Side Request Forgery (SSRF)

Affected Products

ProductVersions
datamodel-code-generatorkoxudaxi
  • >= 0.9.1, < 0.61.0Affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.