Advisory record · GHSA-rfr2-mq9m-x2qx

datamodel-code-generator vulnerable to SSRF via --url: no host/IP validation, follows redirects

CVSS 8.2 HighEPSS 0.0026 · 17th percentile

Published by the GitHub Advisory Database at 28 Jul 2026, 21:30 UTC. agentprime has not analysed this yet, so whether it affects any app is not known.

PackageEcosystemAffectedFixed in
datamodel-code-generatorPyPI>=0.9.1, <0.61.00.61.0
Identifiers
GHSA-rfr2-mq9m-x2qx · CVE-2026-54691 · PYSEC-2026-3564
Weakness (CWE)
CWE-918
Published
28 Jul 2026
Updated
10 Sept 2026

Machine-written summary

Summary written by Claude Haiku from the source advisory. Not reviewed by a person.

Affected: datamodel-code-generator versions from 0.9.1 before 0.61.0. The built-in HTTP fetcher used by --url did not restrict target addresses and followed redirects, so a URL could reach loopback, private, or link-local (including cloud metadata) hosts. An attacker who controls a URL or redirect chain could get the response body written into generated Python source, where it can be read by anyone with access to that file. Upgrade to version 0.61.0, which blocks non-public targets by default and does not follow redirects unless opted in.

Written 1 Nov 2026.

Not analysed yet

We haven’t published our analysis of this Advisory yet. Once a person has reviewed it, this page will say what’s vulnerable, what has to be true for your app to be affected, and how to check.

Severity and exploitation

ScoreRatingCVSSVectorSource
8.2 High 3.1 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N CNA (GitHub_M)
  • CISA KEV Not listed.
  • EPSS 0.0026, the 17th percentile, on 12 Nov 2026: FIRST’s estimate of the chance of exploitation in the next 30 days.

Timeline

  1. 31 Oct 2026, 14:10 UTC First seen by agentprime
  2. 31 Oct 2026, 14:10 UTC Confirmed by OSV

Sources

Facts on this page come from the GitHub Advisory Database (CC-BY 4.0), OSV and the other sources listed, as published. We don’t reproduce full advisory descriptions, which can contain exploit code.