Quick answers
- Is CVE-2026-55391 exploited in the wild?
- No. Junglewise Threat Intelligence has no report of CVE-2026-55391 being exploited in the wild.
- How severe is CVE-2026-55391?
- High severity, with a CVSS score of 7.5, published 28 July 2026.
- Which products and versions are affected?
- Koxudaxi Datamodel-Code-Generator < 0.63.0, <= 0.62.0; datamodel-code-generator (PyPI) ECOSYSTEM:introduced=0,fixed=0.63.0.
- Is there a fix for CVE-2026-55391?
- Yes. datamodel-code-generator (PyPI): upgrade to 0.63.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is CVE-2026-55391 attacked?
- It is attacked over the network, in a software library.
- Am I affected by CVE-2026-55391?
- Check whether you run Koxudaxi Datamodel-Code-Generator or datamodel-code-generator (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
How to fix
- datamodel-code-generator (PyPI): upgrade to 0.63.0 or later
pip install "datamodel-code-generator>=0.63.0"
Technical details
A Server-Side Request Forgery (SSRF) vulnerability exists in datamodel-code-generator due to a Time-of-Check Time-of-Use (TOCTOU) flaw in its HTTP fetching logic. The tool validates a URL's resolved IP address against a blocklist of private networks but then allows the underlying HTTP client (httpx) to perform a second, independent DNS resolution during the actual connection. An attacker can use a DNS rebinding attack—where a hostname initially resolves to a safe public IP during validation but then resolves to a private IP (e.g., 127.0.0.1 or 169.254.169.254) during the connection—to bypass the 'allow_private_network=False' guard. This allows the tool to fetch and potentially leak data from internal services or cloud metadata endpoints. The issue is fixed in version 0.63.0 by pinning the validated IP address for the duration of the request.
Affected products
- koxudaxi datamodel-code-generator < 0.63.0
Identifiers
- CVE-2026-55391
- GHSA-vx7x-vcc2-c44g
- PYSEC-2026-3565
Timeline
- 2026-06-12: patched: Fixed in version 0.63.0
- 2026-07-28: disclosed: Public advisory and CVE published