CVE-2026-55391
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.
How to fix
- koxudaxi datamodel-code-generator0.63.0 or later
- datamodel-code-generator0.63.0 or later
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| koxudaxi datamodel-code-generator | v < 0.63.0 | 0.63.0 |
| datamodel-code-generatorPyPI | v < 0.63.0 | 0.63.0 |
Check your version
Choose the product and enter the version you run to see whether it falls in the affected range.
Attack Surface Management
See the assets tied to your domains, the technologies they run and known vulnerabilities in one list.