{"uuid": "daa7a92f-17c9-4c84-95df-08d78f617176", "vulnerability_lookup_origin": "1a89b78e-f703-45f3-bb86-59eb712668bd", "author": "9f56dd64-161d-43a6-b9c3-555944290a09", "vulnerability": "CVE-2026-54690", "type": "seen", "source": "https://gist.github.com/alon710/6612cc2025e5b81484a44c804b090d50", "content": "# CVE-2026-54690: CVE-2026-54690: Server-Side Request Forgery in datamodel-code-generator Remote Schema Resolution\n\n&gt; **CVSS Score:** 8.2\n&gt; **Published:** 2026-07-28\n&gt; **Full Report:** https://cvereports.com/reports/CVE-2026-54690\n\n## Summary\nCVE-2026-54690 (GHSA-954p-556p-r752) is a Server-Side Request Forgery (SSRF) vulnerability in the datamodel-code-generator Python library from version 0.9.1 to 0.61.0. The library silently resolves remote JSON Schema references ($ref) over HTTP/HTTPS without verifying the target hosts or IP addresses. Because it automatically follows redirects and permits requests to local and private networks by default, an attacker can submit a crafted schema to trigger connections to internal subnets, localhost, or cloud metadata endpoints. Retrieved sensitive data is subsequently parsed and reflected in the generated Python model files, resulting in local and private data disclosure.\n\n## TL;DR\nA Server-Side Request Forgery (SSRF) flaw in datamodel-code-generator allows remote attackers to read sensitive internal network and host configurations (such as cloud instance metadata) by submitting schemas containing malicious remote references.\n\n## Technical Details\n\n- **CWE ID**: CWE-918\n- **Attack Vector**: Network\n- **CVSS Base Score**: 8.2 (High)\n- **Exploit Status**: PoC Available\n- **Affected Versions**: &gt;= 0.9.1, &lt; 0.61.0\n- **Mitigation Option**: Upgrade to 0.61.0 or disable remote references\n\n## Affected Systems\n\n- datamodel-code-generator\n\n## Mitigation\n\n- Upgrade datamodel-code-generator to version 0.61.0 or higher to enforce private network validation by default.\n- Disable remote references globally using the CLI flag --no-allow-remote-refs or programmatic parameter allow_remote_refs=False.\n- Apply network-level egress filtering policies to isolate build pipelines and parser hosts from local network services and cloud metadata endpoints.\n\n**Remediation Steps:**\n1. Identify all internal systems and software dependencies using datamodel-code-generator.\n2. Update requirements.txt, poetry.lock, or Pipfile configurations to use datamodel-code-generator&gt;=0.61.0.\n3. Verify that existing programmatic calls do not set allow_private_network=True unless parsing trusted internal schemas.\n4. Deploy container and egress network policies to block traffic to private subnets (RFC 1918) and loopbacks (127.0.0.0/8) from parser runtimes.\n\n## References\n\n- [NVD - CVE-2026-54690](https://nvd.nist.gov/vuln/detail/CVE-2026-54690)\n- [GitHub Security Advisory GHSA-954p-556p-r752](https://github.com/koxudaxi/datamodel-code-generator/security/advisories/GHSA-954p-556p-r752)\n- [Fix Commit 5fdba4a09f2d7a9996a504975b7ef7d63e3715bb](https://github.com/koxudaxi/datamodel-code-generator/commit/5fdba4a09f2d7a9996a504975b7ef7d63e3715bb)\n- [datamodel-code-generator v0.61.0 Release Notes](https://github.com/koxudaxi/datamodel-code-generator/releases/tag/0.61.0)\n\n\n---\n*Generated by [CVEReports](https://cvereports.com/reports/CVE-2026-54690) - Automated Vulnerability Intelligence*", "creation_timestamp": "2026-07-29T14:31:27.675189Z"}