CVE-2026-55391
datamodel-code-generator vulnerable to SSRF protection bypass via DNS rebinding
- Published
- Updated
- Reserved
- 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.
Public exploit
A reference of the record is tagged as an exploit or proof of concept: anyone can try it against an unpatched system. CISA's SSVC rates its exploitation: a proof of concept is public.
Timeline
ID reserved
By GitHub_M
- 42 days later
· 42 days later
Published
- 1 day later
· 1 day later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| GitHub_MCNA (assigner) | 3.1 | High7.5 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:L/A:N |
| NVDNVD · Analyzed | 3.1 | High7.5 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:L/A:N |
- EPSS (exploitation in 30 days)
- 0.30% · top 77% of all CVEs (7 Nov 2026)
- CISA SSVC
- Exploitation: poc · Automatable: no · Technical impact: partial
The list uses the assigner's score when there is one, then CISA's, then NVD's: High 7.5.
Weakness
- CWE-350: Reliance on Reverse DNS Resolution for a Security-Critical Action (opens in a new tab)All about CWE-350 and its CVEs
- CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition (opens in a new tab)All about CWE-367 and its CVEs
- CWE-918: Server-Side Request Forgery (SSRF) (opens in a new tab)All about CWE-918 and its CVEs
Affected products
koxudaxi · datamodel-code-generator
- affected < 0.63.0
Affected packages
From reviewed advisories of the GitHub Advisory Database.
- PyPIdatamodel-code-generatorGHSA-vx7x-vcc2-c44g (opens in a new tab)
References (4)
- https://github.com/koxudaxi/datamodel-code-generator/security/advisories/GHSA-vx7x-vcc2-c44g (opens in a new tab)x_refsource_CONFIRM
- https://github.com/koxudaxi/datamodel-code-generator/commit/25c8b7e497419eb20b230fa3318c04f9bebc5a6f (opens in a new tab)x_refsource_MISC
- https://github.com/koxudaxi/datamodel-code-generator/releases/tag/0.63.0 (opens in a new tab)x_refsource_MISC
- https://gist.github.com/thegr1ffyn/c1d54dd6ff2a4c0d7d0dabe00c4985f4 (opens in a new tab)exploit
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-vx7x-vcc2-c44g (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://trackcve.app/cve/CVE-2026-55391)Record last updated .