top of page
perceptive_background_267k.jpg

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

Click to open the original link from this advisory

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:

Related CVE's:

Related threat actors:

IOC's:

This article was created with the assistance of AI technology by Perceptive.

© 2025 by Perceptive Security. All rights reserved.

email: info@perceptivesecurity.com

Disclaimer: Deze website toont informatie afkomstig van externe bronnen. Perceptive aanvaardt geen verantwoordelijkheid voor de inhoud, juistheid of volledigheid van deze informatie.

bottom of page