CVE-2026-55391
HIGH 7.5CVSS 3.1datamodel-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.
- Published
- 28 Jul 2026
- Last modified
- 23 Oct 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Analyzed
- Weakness
- CWE-350CWE-367CWE-918
- Also known as
- GHSA-vx7x-vcc2-c44gPYSEC-2026-3565
- Sources
- NVDJSONOSV GHSA-vx7x-vcc2-c44gJSONOSV PYSEC-2026-3565JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:L/A:N |
| OSV | GitHub | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:L/A:N |
| OSV | PyPA | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:L/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | koxudaxi | datamodel-code-generatorcpe:2.3:a:koxudaxi:datamodel-code-generator:*:*:*:*:*:*:*:* |
< 0.63.0 | 0.63.0 |
| OSV | PyPI | datamodel-code-generator | < 0.63.0 | 0.63.0 |
References
- 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/security/advisories/GHSA-vx7x-vcc2-c44g · Exploit, Vendor Advisory, WEB
- https://gist.github.com/thegr1ffyn/c1d54dd6ff2a4c0d7d0dabe00c4985f4 · Third Party Advisory
- 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
History
- 25 Nov 2026 21:04 UTC · NVD: first stored (published 28 Jul 2026)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 4 Aug 2026)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 28 Jul 2026)