Read the docs
TI-2026-39512 Aliases CVE-2026-54691GHSA-rfr2-mq9m-x2qx

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

Priority HIGH 69CWE-918Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
Required
Attack complexity
Low
Impact type
—
Confidentiality · integrity · availability
High · Low · None
Fix status
Fixed

Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub.

Summary

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.

Why it matters now

Exploitation Proof of concept CISA SSVC · not in CISA KEV
EPSS 0.00259 17th percentileScored 2026-11-07
Fix Fixed datamodel-code-generator (koxudaxi): 0.61.0datamodel-code-generator (PyPI): 0.61.0

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
Poc
Automatable
No
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
koxudaxidatamodel-code-generator0.9.1 to before 0.61.00.61.0Patch availableCNA
—datamodel-code-generator (PyPI)0.9.1 to before 0.61.00.61.0Patch availableGHSA-rfr2-mq9m-x2qx
  • datamodel-code-generator Vendorkoxudaxi Affected 0.9.1 to before 0.61.0 Fixed in 0.61.0 Patch available CNA
  • datamodel-code-generator (PyPI) Vendor— Affected 0.9.1 to before 0.61.0 Fixed in 0.61.0 Patch available GHSA-rfr2-mq9m-x2qx

CPE names Threatist (inferred) · 1

Inferred from how NVD named this product before; not given by a source.

CPEVersionsRoleVendor
cpe:2.3:a:koxudaxi:datamodel-code-generator:*:*:*:*:*:*:*:*——koxudaxi
  • cpe:2.3:a:koxudaxi:datamodel-code-generator:*:*:*:*:*:*:*:* Versions — — ·koxudaxi

Remediation

  • Fix · CNA datamodel-code-generator (koxudaxi) Fixed in 0.61.0
  • Fix · GHSA-rfr2-mq9m-x2qx datamodel-code-generator (PyPI) Fixed in 0.61.0 Advisory →

Timeline

  1. 2026-10-02 Threatist record created from CVE-2026-54691
  2. 2026-10-03 Alias added: GHSA-rfr2-mq9m-x2qx

References

  • TI-2026-84481 Code injection in fastapi-code-generator via OpenAPI route paths CVSS 4.0CRITICAL 9.3
  • TI-2026-84480 Code injection in fastapi-code-generator route docstrings CVSS 4.0CRITICAL 9.3
  • TI-2026-39961 Arbitrary local file read via XSD `schemaLocation` (`xs:include`/`xs:import`) path traversal, with no remote-ref gate CVSS 3.1HIGH 7.5
  • TI-2026-39960 Information disclosure in koxudaxi datamodel-code-generator CVSS 3.1HIGH 7.5
  • TI-2026-39511 datamodel-code-generator vulnerable to SSRF via JSON-Schema `$ref` to HTTP URL (silent by default) CVSS 3.1HIGH 8.2
  • TI-2026-39483 Code injection in koxudaxi datamodel-code-generator CVSS 3.1HIGH 7.8
See all 15 →

Sources