PoC Monitor
← All CVEs
CVE-2026-54690published 28 Jul 2026 21:42 UTCData: JSON · API

Koxudaxi datamodel-code-generator

datamodel-code-generator vulnerable to SSRF via JSON-Schema `$ref` to HTTP URL (silent by default)

datamodel-code-generator generates Pydantic v2 models, dataclasses, TypedDict, and msgspec.Struct from OpenAPI, JSON Schema, GraphQL, Avro, Protobuf, and raw JSON, YAML, or CSV. From 0.9.1 until 0.61.0, datamodel-code-generator silently dereferences attacker-controlled JSON Schema $ref HTTP or HTTPS URLs in src/datamodel_code_generator/parser/jsonschema.py through _get_ref_body, and the --allow-remote-refs gate can warn instead of blocking, allowing server-side request forgery through src/datamodel_code_generator/http.py. 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

Timeline

Days relative to CVE publication
-2t=0+2+4+6+8CVE published28 Jul 2026 · t = 0

No public PoC found yet; not in CISA KEV.

PoC repositories

Found on GitHub.

No PoC repositories found yet.