datamodel-code-generator is vulnerable to Server-Side Request Forgery (SSRF)
82
High Risk
The datamodel-code-generator HTTP fetcher loads schemas from URLs passed via --url without validating hosts or redirect targets. With the [http] extra installed, an attacker who can influence the URL can reach loopback, private, link-local, or cloud metadata endpoints and reflect responses into generated Python source. Before the fix, redirects were followed unconditionally and only HTML responses were filtered. The patch validates HTTP(S) URLs, blocks non-public network targets by default, validates each redirect, and requires explicit opt-in for private network access.
You are affected if you are using a version that falls within the vulnerable range and have installed the [http] extra.
datamodel-code-generator is vulnerable to Server-Side Request Forgery (SSRF) in versions 0.9.1 - 0.60.2.
Upgrade the datamodel-code-generator library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

SOC 2Compliant
ISO 27001Compliant