{"id":"CVE-2026-54690","published":"2026-07-28T21:42:06Z","modified":"2026-07-29T15:24:16Z","title":"datamodel-code-generator vulnerable to SSRF via JSON-Schema `$ref` to HTTP URL (silent by default)","vendor":"koxudaxi","product":"datamodel-code-generator","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.2,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00388,"percentile":0.33793,"provenance":"source"},"cwes":[{"id":"CWE-918","name":"Server-Side Request Forgery"}],"references":[{"url":"https://github.com/koxudaxi/datamodel-code-generator/security/advisories/GHSA-954p-556p-r752","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/koxudaxi/datamodel-code-generator/commit/5fdba4a09f2d7a9996a504975b7ef7d63e3715bb","tags":["x_refsource_MISC"]},{"url":"https://github.com/koxudaxi/datamodel-code-generator/releases/tag/0.61.0","tags":["x_refsource_MISC"]}],"priority":{"score":12.5,"factors":[{"name":"EPSS percentile","points":6.76},{"name":"CVSS severity","points":5.74}]},"vendorSlug":"koxudaxi","affectedVersions":[{"vendor":"koxudaxi","product":"datamodel-code-generator","versions":[">= 0.9.1, < 0.61.0"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2026-07-29T14:43:53.317228Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"datamodel-code-generator","vulnerableRanges":[">=0.9.1, <0.61.0"],"patched":["0.61.0"],"from":["GHSA-954p-556p-r752","PYSEC-2026-3560"],"provenance":"source"}],"summary":{"text":"datamodel-code-generator, a tool that generates Pydantic v2 models, dataclasses, TypedDict, and msgspec.Struct from schemas, contains a server-side request forgery flaw in its JSON Schema parser, where $ref references to HTTP or HTTPS URLs are dereferenced without blocking, and the remote-reference gate can warn rather than stop the request. An attacker who can supply a malicious JSON Schema to the tool, with user interaction required to run it against that schema and no authentication needed, can cause the generator's host to issue requests to URLs of the attacker's choosing.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:46:31Z"},"euvd":{"id":"EUVD-2026-50074","exploited":false,"provenance":"source"}}