CVE-2026-55391Koxudaxi Datamodel-code-generator
High 7.5 No auth needed
Follow: this CVE · Koxudaxi · Koxudaxi Datamodel-code-generator We alert you by email or Slack (account required).
- Priority
- 60
- CVSS 3.1
- 7.5
- EPSS
- —
- Auth required
- No
- Published
- Jul 28, 2026
- Updated
- Oct 23, 2026
- Category
- Application · Cross-platform
- SSVC (CISA)
- Exploitation: proof of concept · Automatable: no · Technical impact: partial
- Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:L/A:N
What happens
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.
What to do
- Apply the vendor's security update for Datamodel-code-generator.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| PyPI | datamodel-code-generator |
< 0.63.0 |
0.63.0 |
pip install "datamodel-code-generator>=0.63.0" |
| PyPI | datamodel-code-generator |
< 0.63.0 |
0.63.0 |
pip install "datamodel-code-generator>=0.63.0" |
Per OSV / GitHub Advisories (GHSA-vx7x-vcc2-c44g, PYSEC-2026-3565). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| koxudaxi | datamodel-code-generator | < 0.63.0 |
Official advisories
- python313-datamodel-code-generator-0.72.3-1.1 on GA media · SUSE · openSUSE-SU-2026:11538-1 · Aug 18, 2026 High
Vendor, CERT and distribution advisories that name this CVE. Original titles.
Official sources
References
Links published by the sources. Open them with care.
- github.com Patch
- github.com Release Notes
- github.com Exploit Vendor Advisory
- gist.github.com Third Party Advisory