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

- Severity: High 8.2 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.26%, higher than 18% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-07-28T21:42:06.802Z
- Modified: 2026-10-23T23:10:00.157Z
- Also known as: GHSA-954p-556p-r752, PYSEC-2026-3560
- Weaknesses: CWE-918
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- koxudaxi datamodel-code-generator: >= 0.9.1, < 0.61.0; from 0.9.1 before 0.61.0
- datamodel-code-generator (PyPI): from 0.9.1 before 0.61.0

## Every score

- GitHub_M: CVSS:3.1 8.2 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N`
- GitHub: CVSS:3.1 8.2 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N`
- PyPA Advisory Database: CVSS:3.1 8.2 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N`

## References

- <https://github.com/koxudaxi/datamodel-code-generator/security/advisories/GHSA-954p-556p-r752> (exploit, vendor-advisory, web)
- <https://github.com/koxudaxi/datamodel-code-generator/commit/5fdba4a09f2d7a9996a504975b7ef7d63e3715bb> (patch, web)
- <https://github.com/koxudaxi/datamodel-code-generator/releases/tag/0.61.0> (release-notes, web)
- <https://github.com/koxudaxi/datamodel-code-generator> (package)
- <https://pypi.org/project/datamodel-code-generator> (package)
- <https://github.com/advisories/GHSA-954p-556p-r752> (advisory)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-54690> (advisory)

## Sources

- CVE List: [CVE-2026-54690](https://www.cve.org/CVERecord?id=CVE-2026-54690), CVE Terms of Use, modified 2026-07-29
- GitHub Advisory Database: [GHSA-954p-556p-r752](https://github.com/advisories/GHSA-954p-556p-r752), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2026-54690](https://nvd.nist.gov/vuln/detail/CVE-2026-54690), Public domain, modified 2026-10-23
- PyPA Advisory Database: [PYSEC-2026-3560](https://osv.dev/vulnerability/PYSEC-2026-3560), CC-BY-4.0, modified 2026-08-04

---

Page: https://cve.day/CVE-2026-54690 · Whole record: https://cve.day/CVE-2026-54690.json · Rebuilt by cve.day 2026-11-25T22:59:30.388Z
