CVE-2026-54691 json
datamodel-code-generator vulnerable to SSRF via --url: no host/IP validation, follows redirects
published 2026-07-28 3 mo ago modified 2026-10-23 16 d ago also EUVD-2026-50069 , GHSA-rfr2-mq9m-x2qx , PYSEC-2026-3564
- cvss
- 8.2
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.3%
- EPSS 0.3% chance of exploitation in 30 days, percentile 17%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- pypi datamodel-code-generator 0.61.0
- koxudaxi datamodel-code-generator 0.61.0
CISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- no
- Technical impact
- partial
- Assessed
- 3 mo ago
Exploit prediction
0.26% chance of exploitation in the next 30 days, higher than 17% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- github.com https://github.com/koxudaxi/datamodel-code-generator/security/advisories/GHSA-rfr2-mq9m-x2qx referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 8.2 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N |
| GitHub | 3.1 | 8.2 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N |
| OSV | 3.1 | 8.2 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | datamodel-code-generator | >=0.9.1, <0.61.0 |
0.61.0 |
Affected products
- koxudaxi datamodel-code-generator
Classification
- Weakness
-
- CWE-918 Server-Side Request Forgery
References
-
github.com
/koxudaxi/datamodel-code-generator/commit/5fdba4a09f2d7a9996a504975b7ef7d63e3715bb
web
-
github.com
/koxudaxi/datamodel-code-generator/security/advisories/GHSA-rfr2-mq9m-x2qx
exploit, web
-
github.com
/koxudaxi/datamodel-code-generator/releases/tag/0.61.0
web
-
github.com
/koxudaxi/datamodel-code-generator
package
-
pypi.org
/project/datamodel-code-generator
package
-
github.com
/advisories/GHSA-rfr2-mq9m-x2qx
advisory
-
nvd.nist.gov
/vuln/detail/CVE-2026-54691
advisory
Sources
- CVE List CVE-2026-54691
- GitHub Advisory GHSA-rfr2-mq9m-x2qx
- NVD CVE-2026-54691
- OSV PYSEC-2026-3564
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.
CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.