Quick answers
- Is CVE-2026-54690 exploited in the wild?
- No. Junglewise Threat Intelligence has no report of CVE-2026-54690 being exploited in the wild.
- How severe is CVE-2026-54690?
- 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-54690?
- 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-54690 attacked?
- It is attacked over the network, in a software library.
- Am I affected by CVE-2026-54690?
- 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 datamodel-code-generator within the `_get_ref_body` function of `src/datamodel_code_generator/parser/jsonschema.py`. The tool silently dereferences HTTP/HTTPS URLs in JSON Schema `$ref` fields without validating the destination IP or host, even when the `--allow-remote-refs` gate is at its default setting (which only issues a deprecation warning). An attacker can craft a schema that points to internal metadata services (e.g., AWS IMDS) or private network endpoints; the tool will fetch the content and reflect the response body into the generated Python models. This affects users who have installed the `[http]` extra. The issue is fixed in version 0.61.0 by implementing strict validation of redirect targets and blocking non-public network ranges by default unless the new `--allow-private-network` flag is used.
Affected products
- koxudaxi datamodel-code-generator >= 0.9.1, < 0.61.0
Identifiers
- CVE-2026-54690
- GHSA-954p-556p-r752
- PYSEC-2026-3560
Timeline
- 2026-06-08: patched: Version 0.61.0 released
- 2026-06-08: advisory: GitHub Security Advisory GHSA-954p-556p-r752 published
- 2026-07-28: disclosed: CVE-2026-54690 published to NVD