Koxudaxi datamodel-code-generator
datamodel-code-generator vulnerable to SSRF protection bypass via DNS rebinding
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.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- < 0.63.0
Fixed in 0.63.0
Mitigation
Upgrade datamodel-code-generator to 0.63.0 or later.
References
- Vendor advisory github.com/koxudaxi/datamodel-code-generator/s…
- Patch github.com/koxudaxi/datamodel-code-generator/c…
- Release notes github.com/koxudaxi/datamodel-code-generator/r…
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.
Other public exploits
Exploit-DB, Metasploit and nuclei count as public PoCs. Exploit-tagged references from the CVE record and NVD are links only. None of these are analysed by us.| Source | Title | Published | Found by us |
|---|---|---|---|
| CVE record (tagged exploit) | https://gist.github.com/thegr1ffyn/c1d54dd6ff2a4c0d7d0dabe00c4985f4 | unknown | 14 Nov 2026 |