CVE-2026-54690 json
datamodel-code-generator vulnerable to SSRF via JSON-Schema `$ref` to HTTP URL (silent by default)
published 5mo ago modified yesterday also EUVD-2026-50074 , GHSA-954p-556p-r752 , PYSEC-2026-3560
- cvss
- 8.2
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.4%
- EPSS 0.4% chance of exploitation in 30 days, percentile 33%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- pypi datamodel-code-generator 0.61.0
- koxudaxi datamodel-code-generator 0.61.0
Is CVE-2026-54690 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerCISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- no
- Technical impact
- partial
- Assessed
- 3mo ago
Exploit prediction
0.39% chance of exploitation in the next 30 days, higher than 33% of all scored CVEs (FIRST EPSS, 2026-11-11).
Exploits and checks
- github.com https://github.com/koxudaxi/datamodel-code-generator/security/advisories/GHSA-954p-556p-r752 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 8.2 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N |
| GitHub | 3.1 | 8.2 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N |
| OSV | 3.1 | 8.2 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | datamodel-code-generator | >=0.9.1, <0.61.0 |
0.61.0 |
Affected products
- koxudaxi datamodel-code-generator
Classification
- Weakness
-
- CWE-918 Server-Side Request Forgery
References
-
github.com
/koxudaxi/datamodel-code-generator/commit/5fdba4a09f2d7a9996a504975b7ef7d63e3715bb
web, patch
-
github.com
/koxudaxi/datamodel-code-generator/security/advisories/GHSA-954p-556p-r752
exploit, web, vendor-advisory
-
github.com
/koxudaxi/datamodel-code-generator/releases/tag/0.61.0
web, release-notes
-
github.com
/koxudaxi/datamodel-code-generator
package
-
pypi.org
/project/datamodel-code-generator
package
-
github.com
/advisories/GHSA-954p-556p-r752
advisory
-
nvd.nist.gov
/vuln/detail/CVE-2026-54690
advisory
-
github.com
/datamodel-code-generator/datamodel-code-generator/security/advisories/GHSA-954p-556p-r752
advisory
Sources
- CVE List CVE-2026-54690
- GitHub Advisory GHSA-954p-556p-r752
- NVD CVE-2026-54690
- OSV PYSEC-2026-3560
- Maintainer advisory GHSA-954p-556p-r752
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.
The maintainers of datamodel-code-generator/datamodel-code-generator published their own advisory on GitHub. Reviewed sources take precedence over it.