datamodel-code-generator vulnerable to SSRF protection bypass via DNS rebinding
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- High
- Impact type
- —
- Confidentiality · integrity · availability
- High · Low · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| koxudaxi | datamodel-code-generator | before 0.63.0 | 0.63.0 | Patch available | CNA |
| — | datamodel-code-generator (PyPI) | before 0.63.0 | 0.63.0 | Patch available | GHSA-vx7x-vcc2-c44g |
- datamodel-code-generator Vendorkoxudaxi Affected before 0.63.0 Fixed in 0.63.0 Patch available CNA
- datamodel-code-generator (PyPI) Vendor— Affected before 0.63.0 Fixed in 0.63.0 Patch available GHSA-vx7x-vcc2-c44g
Remediation
- Fix · CNA datamodel-code-generator (koxudaxi) Fixed in 0.63.0
- Fix · GHSA-vx7x-vcc2-c44g datamodel-code-generator (PyPI) Fixed in 0.63.0 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2026-55391
- 2026-10-03 Alias added: GHSA-vx7x-vcc2-c44g
References
Exploit 1
Patch 1
More koxudaxi Datamodel-code-generator vulnerabilities
- TI-2026-39960 Information disclosure in koxudaxi datamodel-code-generator CVSS 3.1HIGH 7.5
- TI-2026-39511 datamodel-code-generator vulnerable to SSRF via JSON-Schema `$ref` to HTTP URL (silent by default) CVSS 3.1HIGH 8.2
- TI-2026-39483 Code injection in koxudaxi datamodel-code-generator CVSS 3.1HIGH 7.8
- TI-2026-39984 Code injection in koxudaxi datamodel-code-generator CVSS 3.1HIGH 7.5
- TI-2026-39480 `datamodel-code-generator` vulnerable to code injection in via attacker-controlled `default_factory` schema field CVSS 3.1HIGH 8.8
Sources
- CVE-2026-55391 · CVE Program
- CVE-2026-55391 · NVD
- FIRST EPSS
- GHSA-vx7x-vcc2-c44g · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences