


Perceptive Security
SOC/SIEM Consultancy

datamodel-code-generator generates Pydantic v2 models, dataclasses, TypedDict, and msgspec.Struct from OpenAPI, JSON Schema, GraphQL, Avro, Protobuf, and raw JS…
Published:
28 July 2026 at 00:00:00
Alert date:
29 July 2026 at 01:04:30
Source:
nvd.nist.gov
Supply Chain & Dependencies, Web Technologies
CVE-2026-55391 affects datamodel-code-generator, a tool that generates Pydantic v2 models, dataclasses, TypedDict, and msgspec.Struct from various schema formats. Prior to version 0.63.0, the tool validates a URL host once during the initial check but then allows httpx to independently resolve the host for the actual connection. This creates a DNS rebinding vulnerability that can bypass the allow_private_network=False security control. An attacker could exploit this flaw to reach internal services that should be inaccessible from external contexts. The vulnerability exists in src/datamodel_code_generator/http.py, specifically in the get_body, _validate_url_for_fetch, and _get_ips_from_host functions. The issue has been resolved in version 0.63.0 of the package. Users are strongly advised to upgrade to the fixed version to prevent potential unauthorized access to internal network resources.
Technical details
Mitigation steps:
Affected products:
datamodel-code-generator
Related links:
https://nvd.nist.gov/vuln/detail/CVE-2026-55391
https://github.com/koxudaxi/datamodel-code-generator/commit/25c8b7e497419eb20b230fa3318c04f9bebc5a6f
https://github.com/koxudaxi/datamodel-code-generator/releases/tag/0.63.0
https://github.com/koxudaxi/datamodel-code-generator/security/advisories/GHSA-vx7x-vcc2-c44g
Related CVE's:
Related threat actors:
IOC's:
This article was created with the assistance of AI technology by Perceptive.
