Intel

AIKIDO-2026-789112

datamodel-code-generator is vulnerable to Server-Side Request Forgery (SSRF)

CVE-2026-54690Published Jun 18, 2026
June 18, 2026

82

CVE Score

High

Server-Side Request Forgery (SSRF)

Are you affected? Scan for Free

TL;DR

Remote JSON Schema and OpenAPI $ref values pointing at HTTP(S) URLs are fetched through the shared HTTP helper when remote references are allowed. With the [http] extra installed, a schema document supplied by an attacker can trigger fetches to internal services and embed the response into generated code without the developer typing a URL. Before the fix, the default allow_remote_refs behavior still fetched remote refs after only a deprecation warning. The fix applies the shared URL and redirect validation so non-public targets are blocked unless private network access is explicitly enabled.

How do I fix this?

Upgrade the datamodel-code-generator library to the patch version.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and have installed the [http] extra.

Versions

0.9.1 - 0.60.2

Fixed in 0.61.0

Background info

datamodel-code-generator is vulnerable to Server-Side Request Forgery (SSRF) in versions 0.9.1 - 0.60.2.

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea