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.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2026-55391
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 3 Nov 2026, 08:42 UTC · Revision 1
Source evidence
datamodel-code-generator vulnerable to SSRF protection bypass via DNS rebinding
core-osv · Original sourcePublished 28 Jul 2026, 21:45 UTC
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.
osv:CVE-2026-55391
Complete source record
{
"id": "171876cb3ffe766e525eb3d9fa891268584fd18186d04c1f5ae4d576f79302cf",
"url": "https://osv.dev/vulnerability/CVE-2026-55391",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "datamodel-code-generator vulnerable to SSRF protection bypass via DNS rebinding",
"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.",
"evidence": "osv:CVE-2026-55391",
"products": [],
"severity": "high",
"structured": {
"id": "CVE-2026-55391",
"aliases": [
"CVE-2026-55391",
"GHSA-vx7x-vcc2-c44g",
"PYSEC-2026-3565"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:L/A:N"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/datamodel-code-generator/datamodel-code-generator",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "a1252a218df10537cd0526ae69757cde446a1ce6"
},
{
"fixed": "25c8b7e497419eb20b230fa3318c04f9bebc5a6f"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:koxudaxi:datamodel-code-generator:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "0"
},
{
"fixed": "0.63.0"
}
],
"source": "CPE_RANGE"
},
{
"range": [
{
"fixed": "25c8b7e497419eb20b230fa3318c04f9bebc5a6f"
}
],
"source": "REFERENCES_COMMIT"
},
{
"range": [
{
"fixed": "a1252a218df10537cd0526ae69757cde446a1ce6"
}
],
"source": "REFERENCES_TAG",
"original_tag": "0.63.0"
}
]
}
}
],
"versions": [
"0.62.0",
"0.61.0",
"0.60.2",
"0.60.1",
"0.60.0",
"0.59.1",
"0.59.0",
"0.58.0",
"0.57.0",
"0.56.1",
"0.56.0",
"0.55.0",
"0.54.1",
"0.54.0",
"0.53.0",
"0.52.2",
"0.52.1",
"0.52.0",
"0.51.0",
"0.50.0",
"0.49.0",
"0.48.0",
"0.47.0",
"0.46.0",
"0.45.0",
"0.44.0",
"0.43.1",
"0.43.0",
"0.42.2",
"0.42.1",
"0.42.0",
"0.41.0",
"0.40.0",
"0.39.0",
"0.38.0",
"0.37.0",
"0.36.0",
"0.35.0",
"0.34.0",
"0.33.0",
"0.32.0",
"0.31.2",
"0.31.1",
"0.31.0",
"0.30.2",
"0.30.1",
"0.30.0",
"0.29.0",
"0.28.5",
"0.28.4",
"0.28.3",
"0.28.2",
"0.28.1",
"0.28.0",
"0.27.3",
"0.27.2",
"0.27.1",
"0.27.0",
"0.26.5",
"0.26.4",
"0.26.3",
"0.26.2",
"0.26.1",
"0.26.0",
"0.25.9",
"0.25.8",
"0.25.7",
"0.25.6",
"0.25.5",
"0.25.4",
"0.25.3",
"0.25.2",
"0.25.1",
"0.25.0",
"0.24.2",
"0.24.1",
"0.24.0",
"0.23.0",
"0.22.1",
"0.22.0",
"0.21.5",
"0.21.4",
"0.21.3",
"0.21.2",
"0.21.1",
"0.21.0",
"0.20.0",
"0.19.0",
"0.18.1",
"0.18.0",
"0.17.2",
"0.17.1",
"0.17.0",
"0.16.1",
"0.16.0",
"0.15.0",
"0.14.1",
"0.14.0",
"0.13.5",
"0.13.4",
"0.13.3",
"0.13.2",
"0.13.1",
"0.13.0",
"0.12.3",
"0.12.2",
"0.12.1",
"0.12.0",
"0.11.20",
"0.11.19",
"0.11.18",
"0.11.17",
"0.11.16",
"0.11.15",
"0.11.14",
"0.11.13",
"0.11.12",
"0.11.11",
"0.11.10",
"0.11.9",
"0.11.8",
"0.11.7",
"0.11.6",
"0.2.11",
"0.11.5",
"0.11.4",
"0.11.3",
"0.11.2",
"0.11.1",
"0.11.0",
"0.10.3",
"0.10.2",
"0.10.1",
"0.10.0",
"0.9.4",
"0.9.3",
"0.9.2",
"0.9.1",
"0.9.0",
"0.8.3",
"0.8.2",
"0.8.1",
"0.8.0",
"0.7.3",
"0.7.2",
"0.7.1",
"0.7.0",
"0.6.26",
"0.6.25",
"0.6.24",
"0.6.23",
"0.6.22",
"0.6.21",
"0.6.20",
"0.6.19",
"0.6.18",
"0.6.17",
"0.6.16",
"0.6.15",
"0.6.14",
"0.6.13",
"0.6.12",
"0.6.11",
"0.6.10",
"0.6.9",
"0.6.8",
"0.6.7",
"0.6.6",
"0.6.5",
"0.6.4",
"0.6.3",
"0.6.2",
"0.6.1",
"0.6.0",
"0.5.39",
"0.5.38",
"0.5.37",
"0.5.36",
"0.5.35",
"0.5.34",
"0.5.33",
"0.5.32",
"0.5.31",
"0.5.30",
"0.5.29",
"0.5.28",
"0.5.27",
"0.5.26",
"0.5.25",
"0.5.24",
"0.5.23",
"0.5.22",
"0.5.21",
"0.5.20",
"0.5.19",
"0.5.18",
"0.5.17",
"0.5.16",
"0.5.15",
"0.5.14",
"0.5.13",
"0.5.12",
"0.5.11",
"0.5.10",
"0.5.9",
"0.5.8",
"0.5.7",
"0.5.6",
"0.5.5",
"0.5.4",
"0.5.3",
"0.5.2",
"0.5.1",
"0.5.0",
"0.4.11",
"0.4.10",
"0.4.9",
"0.4.8",
"0.4.7",
"0.4.6",
"0.4.5",
"0.4.4",
"0.4.3",
"0.4.2",
"0.4.1",
"0.4.0",
"0.3.3",
"0.3.2",
"0.3.1",
"0.3.0",
"0.2.16",
"0.2.15",
"0.2.14",
"0.2.13",
"0.2.12",
"0.2.10",
"0.2.9",
"0.2.8",
"0.2.7",
"0.2.6",
"0.2.5",
"0.2.4",
"0.2.3",
"0.2.2",
"0.2.1",
"0.2.0",
"0.1.0",
"0.0.6",
"0.0.5",
"0.0.4",
"0.0.3",
"0.0.1"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-55391.json"
}
}
],
"modified": "2026-10-28T02:30:27.140950991Z",
"provider": "osv",
"references": [
"https://github.com/koxudaxi/datamodel-code-generator/releases/tag/0.63.0",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/55xxx/CVE-2026-55391.json",
"https://github.com/koxudaxi/datamodel-code-generator/security/advisories/GHSA-vx7x-vcc2-c44g",
"https://nvd.nist.gov/vuln/detail/CVE-2026-55391",
"https://github.com/koxudaxi/datamodel-code-generator/commit/25c8b7e497419eb20b230fa3318c04f9bebc5a6f",
"https://gist.github.com/thegr1ffyn/c1d54dd6ff2a4c0d7d0dabe00c4985f4"
],
"provider_metadata": {
"cwe_ids": [
"CWE-350",
"CWE-367",
"CWE-918"
],
"cna_assigner": "GitHub_M",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/55xxx/CVE-2026-55391.json"
}
},
"related_cves": [
{
"value": "CVE-2026-55391",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 493944,
"published_at": "2026-07-28T21:45:39.058+00:00"
}