CVE-2026-54691: CWE-918: Server-Side Request Forgery (SSRF) in koxudaxi datamodel-code-generator
datamodel-code-generator generates Python data models from schema definitions. From 0.9.1 until 0.61.0, src/datamodel_code_generator/http.py http.get_body accepts --url targets and redirect chain targets without host/IP validation, allowing server-side request forgery against loopback, private, link-local, metadata, and other network-accessible resources. This issue is fixed in version 0.61.0.
AI Analysis
Technical Summary
The datamodel-code-generator Python tool, versions 0.9.1 through 0.60.x, contains an SSRF vulnerability (CWE-918) in the http.get_body function located in src/datamodel_code_generator/http.py. This function accepts URLs and redirect targets without validating whether the host or IP address is internal or restricted, enabling an attacker to induce the server to make unauthorized requests to loopback, private, link-local, metadata, or other network-accessible resources. The vulnerability is resolved in version 0.61.0.
Potential Impact
An attacker can exploit this SSRF vulnerability to make the vulnerable application send unauthorized requests to internal or protected network resources, potentially leading to information disclosure (confidentiality impact is high) and partial integrity impact. There is no direct availability impact. The CVSS score of 8.2 reflects the high severity of this vulnerability.
Mitigation Recommendations
This vulnerability is fixed in datamodel-code-generator version 0.61.0. Users should upgrade to version 0.61.0 or later to remediate this issue. No other official remediation or temporary fixes are documented. Patch status is confirmed by the vendor advisory stating the fix in 0.61.0.
CVE-2026-54691: CWE-918: Server-Side Request Forgery (SSRF) in koxudaxi datamodel-code-generator
Description
datamodel-code-generator generates Python data models from schema definitions. From 0.9.1 until 0.61.0, src/datamodel_code_generator/http.py http.get_body accepts --url targets and redirect chain targets without host/IP validation, allowing server-side request forgery against loopback, private, link-local, metadata, and other network-accessible resources. This issue is fixed in version 0.61.0.
CVSS v3.1
Score 8.2high
Affected software
koxudaxi
datamodel-code-generator
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The datamodel-code-generator Python tool, versions 0.9.1 through 0.60.x, contains an SSRF vulnerability (CWE-918) in the http.get_body function located in src/datamodel_code_generator/http.py. This function accepts URLs and redirect targets without validating whether the host or IP address is internal or restricted, enabling an attacker to induce the server to make unauthorized requests to loopback, private, link-local, metadata, or other network-accessible resources. The vulnerability is resolved in version 0.61.0.
Potential Impact
An attacker can exploit this SSRF vulnerability to make the vulnerable application send unauthorized requests to internal or protected network resources, potentially leading to information disclosure (confidentiality impact is high) and partial integrity impact. There is no direct availability impact. The CVSS score of 8.2 reflects the high severity of this vulnerability.
Mitigation Recommendations
This vulnerability is fixed in datamodel-code-generator version 0.61.0. Users should upgrade to version 0.61.0 or later to remediate this issue. No other official remediation or temporary fixes are documented. Patch status is confirmed by the vendor advisory stating the fix in 0.61.0.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-06-15T22:58:06.562Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 6a6924a99c2644c7f8425677
Added to database: 07/28/2026, 21:52:41 UTC
Last enriched: 07/29/2026, 21:27:50 UTC
Last updated: 09/10/2026, 20:00:54 UTC
Views: 76
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.