CVE-2026-54691 json
datamodel-code-generator vulnerable to SSRF via --url: no host/IP validation, follows redirects
published 5mo ago modified yesterday 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
Is CVE-2026-54691 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerCISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- no
- Technical impact
- partial
- Assessed
- 3mo ago
Exploit prediction
0.26% chance of exploitation in the next 30 days, higher than 17% of all scored CVEs (FIRST EPSS, 2026-11-11).
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
-
github.com
/datamodel-code-generator/datamodel-code-generator/security/advisories/GHSA-rfr2-mq9m-x2qx
advisory
Sources
- CVE List CVE-2026-54691
- GitHub Advisory GHSA-rfr2-mq9m-x2qx
- NVD CVE-2026-54691
- OSV PYSEC-2026-3564
- Maintainer advisory GHSA-rfr2-mq9m-x2qx
Fencer Intel 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.
The maintainers of datamodel-code-generator/datamodel-code-generator published their own advisory on GitHub. Reviewed sources take precedence over it.
CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.