# CVE-2026-55391: datamodel-code-generator vulnerable to SSRF protection bypass via DNS rebinding

- Severity: High 7.5 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/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.24%, higher than 15% of CVEs (2026-12-01)
- Public exploit code or proof of concept: 2 links below, marked "exploit"
- Published: 2026-07-28T21:45:39.058Z
- Modified: 2026-10-23T23:10:00.157Z
- Also known as: GHSA-vx7x-vcc2-c44g, PYSEC-2026-3565
- Weaknesses: CWE-350, CWE-367, CWE-918
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

datamodel-code-generator generates Pydantic v2 models, dataclasses, TypedDict, and msgspec.Struct from OpenAPI, JSON Schema, GraphQL, Avro, Protobuf, and raw JSON, YAML, or CSV. Prior to 0.63.0, datamodel-code-generator validates a URL host once in src/datamodel_code_generator/http.py through get_body, _validate_url_for_fetch, and _get_ips_from_host, but then lets httpx resolve the host again for the connection, allowing DNS rebinding to bypass allow_private_network=False and reach internal services. This issue is fixed in version 0.63.0.

(As written by CVE List.)

## Affected

- koxudaxi datamodel-code-generator: < 0.63.0; before 0.63.0
- datamodel-code-generator (PyPI): before 0.63.0

## Every score

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

## References

- <https://github.com/koxudaxi/datamodel-code-generator/security/advisories/GHSA-vx7x-vcc2-c44g> (exploit, vendor-advisory, web)
- <https://gist.github.com/thegr1ffyn/c1d54dd6ff2a4c0d7d0dabe00c4985f4> (exploit, third-party-advisory)
- <https://github.com/koxudaxi/datamodel-code-generator/commit/25c8b7e497419eb20b230fa3318c04f9bebc5a6f> (patch, web)
- <https://github.com/koxudaxi/datamodel-code-generator/releases/tag/0.63.0> (release-notes, web)
- <https://github.com/koxudaxi/datamodel-code-generator> (package)
- <https://pypi.org/project/datamodel-code-generator> (package)
- <https://github.com/advisories/GHSA-vx7x-vcc2-c44g> (advisory)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-55391> (advisory)

## Sources

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

---

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