Koxudaxi datamodel-code-generator
datamodel-code-generator vulnerable to SSRF via --url: no host/IP validation, follows redirects
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.
First public PoC
None yetno public PoC found
Public PoCs00 on GitHub
CVSS8.2high · scored by CNA · CWE-918
CISA KEV
Not listednot known exploited
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
koxudaxi datamodel-code-generator
- >= 0.9.1, < 0.61.0
Fixed in 0.61.0
Mitigation
Upgrade datamodel-code-generator to 0.61.0 or later.
References
- Vendor advisory github.com/koxudaxi/datamodel-code-generator/s…
- Patch github.com/koxudaxi/datamodel-code-generator/c…
- Release notes github.com/koxudaxi/datamodel-code-generator/r…
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.