CVE-2026-55391
Received Received - Intake

DNS Rebinding Bypass in datamodel-code-generator

Vulnerability report for CVE-2026-55391, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-07-28

Last updated on: 2026-07-28

Assigner: GitHub, Inc.

Description

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-07-28
Last Modified
2026-07-28
Generated
2026-07-29
AI Q&A
2026-07-29
EPSS Evaluated
N/A
NVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
datamodel-code-generator datamodel-code-generator 0.63.0

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-918 The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.
CWE-367 The product checks the state of a resource before using that resource, but the resource's state can change between the check and the use in a way that invalidates the results of the check.
CWE-350 The product performs reverse DNS resolution on an IP address to obtain the hostname and make a security decision, but it does not properly ensure that the IP address is truly associated with the hostname.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

The vulnerability in datamodel-code-generator before version 0.63.0 allows DNS rebinding attacks to bypass the allow_private_network=False setting. The tool validates a URL host once during initial processing but does not prevent subsequent DNS rebinding, which can trick it into connecting to internal services.

Detection Guidance

This vulnerability involves DNS rebinding bypassing allow_private_network=False in datamodel-code-generator versions prior to 0.63.0. To detect it, check if your system runs an affected version by running: pip show datamodel-code-generator. If the version is below 0.63.0, the system is vulnerable. Monitor network traffic for unexpected internal service connections originating from datamodel-code-generator processes.

Impact Analysis

An attacker could exploit this to access internal network services by tricking the application into connecting to restricted hosts. This could lead to unauthorized data access, service disruption, or further network compromise if internal services are exposed.

Compliance Impact

The vulnerability allows DNS rebinding to bypass network restrictions, potentially exposing internal services. This could lead to unauthorized access to sensitive data, which may violate GDPR's data protection requirements or HIPAA's safeguards for protected health information.

Mitigation Strategies

Upgrade datamodel-code-generator to version 0.63.0 or later to address the DNS rebinding vulnerability.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-55391. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart