datamodel-code-generator vulnerable to SSRF via --url: no host/IP validation, follows redirects
Summary
| CVE | CVE-2026-54691 |
|---|---|
| State | PUBLISHED |
| Assigner | GitHub_M |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2026-07-28 22:17:40 UTC |
| Updated | 2026-07-30 20:02:44 UTC |
| 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. |
Risk And Classification
Primary CVSS: v3.1 8.2 HIGH from [email protected]
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N
EPSS: 0.002090000 probability, percentile 0.112540000 (date 2026-08-01)
Problem Types: CWE-918 | CWE-918 CWE-918: Server-Side Request Forgery (SSRF)
| Version | Source | Type | Score | Severity | Vector |
|---|---|---|---|---|---|
| 3.1 | [email protected] | Secondary | 8.2 | HIGH | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N |
| 3.1 | CNA | DECLARED | 8.2 | HIGH | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N |
CVSS v3.1 Breakdown
Attack Vector
NetworkAttack Complexity
LowPrivileges Required
NoneUser Interaction
RequiredScope
ChangedConfidentiality
HighIntegrity
LowAvailability
NoneCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N
Vendor Declared Affected Products
| Source | Vendor | Product | Version | Platforms |
|---|---|---|---|---|
| CNA | Koxudaxi | Datamodel-code-generator | affected >= 0.9.1, < 0.61.0 | Not specified |
References
| Reference | Source | Link | Tags |
|---|---|---|---|
| github.com/koxudaxi/datamodel-code-generator/releases/tag/0.61.0 | [email protected] | github.com | |
| github.com/koxudaxi/datamodel-code-generator/security/advisories/GHSA-rf... | 134c704f-9b21-4f2e-91b3-4a467353bcc0 | github.com | |
| github.com/koxudaxi/datamodel-code-generator/commit/5fdba4a09f2d7a9996a5... | [email protected] | github.com | |
| CVE Program record | CVE.ORG | www.cve.org | canonical |
| NVD vulnerability detail | NVD | nvd.nist.gov | canonical, analysis |
No vendor comments have been submitted for this CVE.
There are currently no legacy QID mappings associated with this CVE.