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

- Severity: High 8.2 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.26%, higher than 18% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-07-28T21:29:52.197Z
- Modified: 2026-10-23T23:10:00.157Z
- Also known as: GHSA-rfr2-mq9m-x2qx, PYSEC-2026-3564
- Weaknesses: CWE-918
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- koxudaxi datamodel-code-generator: >= 0.9.1, < 0.61.0
- datamodel-code-generator (PyPI): from 0.9.1 before 0.61.0

## Every score

- GitHub_M: CVSS:3.1 8.2 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N`
- GitHub: CVSS:3.1 8.2 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N`
- PyPA Advisory Database: CVSS:3.1 8.2 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N`

## References

- <https://github.com/koxudaxi/datamodel-code-generator/security/advisories/GHSA-rfr2-mq9m-x2qx> (exploit, web)
- <https://github.com/koxudaxi/datamodel-code-generator/commit/5fdba4a09f2d7a9996a504975b7ef7d63e3715bb> (web)
- <https://github.com/koxudaxi/datamodel-code-generator/releases/tag/0.61.0> (web)
- <https://github.com/koxudaxi/datamodel-code-generator> (package)
- <https://pypi.org/project/datamodel-code-generator> (package)
- <https://github.com/advisories/GHSA-rfr2-mq9m-x2qx> (advisory)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-54691> (advisory)

## Sources

- CVE List: [CVE-2026-54691](https://www.cve.org/CVERecord?id=CVE-2026-54691), CVE Terms of Use, modified 2026-07-29
- GitHub Advisory Database: [GHSA-rfr2-mq9m-x2qx](https://github.com/advisories/GHSA-rfr2-mq9m-x2qx), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2026-54691](https://nvd.nist.gov/vuln/detail/CVE-2026-54691), Public domain, modified 2026-10-23
- PyPA Advisory Database: [PYSEC-2026-3564](https://osv.dev/vulnerability/PYSEC-2026-3564), CC-BY-4.0, modified 2026-08-04

---

Page: https://cve.day/CVE-2026-54691 · Whole record: https://cve.day/CVE-2026-54691.json · Rebuilt by cve.day 2026-11-25T22:59:30.388Z
