datamodel-code-generator vulnerable to SSRF protection bypass via DNS rebinding

Summary

CVECVE-2026-55391
StatePUBLISHED
AssignerGitHub_M
Source PriorityCVE Program / NVD first with legacy fallback
Published2026-07-28 22:17:48 UTC
Updated2026-07-30 19:07:59 UTC
Descriptiondatamodel-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.

Risk And Classification

Primary CVSS: v3.1 7.5 HIGH from [email protected]

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:L/A:N

EPSS: 0.001970000 probability, percentile 0.096890000 (date 2026-08-01)

Problem Types: CWE-350 | CWE-367 | CWE-918 | CWE-350 CWE-350: Reliance on Reverse DNS Resolution for a Security-Critical Action | CWE-367 CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition | CWE-918 CWE-918: Server-Side Request Forgery (SSRF)


VersionSourceTypeScoreSeverityVector
3.1[email protected]Secondary7.5HIGHCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:L/A:N
3.1CNADECLARED7.5HIGHCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:L/A:N

CVSS v3.1 Breakdown

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Changed
Confidentiality
High
Integrity
Low
Availability
None

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:L/A:N

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA Koxudaxi Datamodel-code-generator affected < 0.63.0 Not specified

References

ReferenceSourceLinkTags
gist.github.com/thegr1ffyn/c1d54dd6ff2a4c0d7d0dabe00c4985f4 134c704f-9b21-4f2e-91b3-4a467353bcc0 gist.github.com
github.com/koxudaxi/datamodel-code-generator/releases/tag/0.63.0 [email protected] github.com
github.com/koxudaxi/datamodel-code-generator/security/advisories/GHSA-vx... [email protected] github.com
github.com/koxudaxi/datamodel-code-generator/commit/25c8b7e497419eb20b23... [email protected] github.com
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report