Quick answers
- Is CVE-2026-54691 exploited in the wild?
- No. Junglewise Threat Intelligence has no report of CVE-2026-54691 being exploited in the wild.
- How severe is CVE-2026-54691?
- High severity, with a CVSS score of 8.2, published 28 July 2026.
- Which products and versions are affected?
- Koxudaxi Datamodel-Code-Generator >= 0.9.1, < 0.61.0, >= 0.9.1, <= 0.60.2; datamodel-code-generator (PyPI) ECOSYSTEM:introduced=0.9.1,fixed=0.61.0.
- Is there a fix for CVE-2026-54691?
- Yes. datamodel-code-generator (PyPI): upgrade to 0.61.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is CVE-2026-54691 attacked?
- It is attacked over the network, in a software library.
- Am I affected by CVE-2026-54691?
- 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.61.0 or later
pip install "datamodel-code-generator>=0.61.0"
Technical details
A Server-Side Request Forgery (SSRF) vulnerability exists in the `http.get_body` function within `src/datamodel_code_generator/http.py`. The component uses `httpx.get` with `follow_redirects=True` but fails to validate the host or IP address of the initial URL or any subsequent redirect targets. An attacker can provide a URL that redirects to loopback addresses, RFC1918 private ranges, or cloud metadata services (e.g., 169.254.169.254). Because the tool reflects the response body into the generated Python models as class attributes or docstrings, sensitive data from internal services can be exfiltrated. This issue is fixed in version 0.61.0, which introduces host validation and a new `--allow-private-network` flag for explicit opt-in.
Affected products
- koxudaxi datamodel-code-generator >= 0.9.1, < 0.61.0
Identifiers
- CVE-2026-54691
- GHSA-rfr2-mq9m-x2qx
- PYSEC-2026-3564
Timeline
- 2026-06-08: patched: Fixed in version 0.61.0
- 2026-07-28: advisory: GitHub Advisory GHSA-rfr2-mq9m-x2qx published