CVE-2026-55389 json
datamodel-code-generator vulnerable to arbitrary local file read via JSON-Schema `$ref` (`file://` and `../` traversal), bypassing `--no-allow-remote-refs`
published 4mo ago modified yesterday also EUVD-2026-50078 , GHSA-8359-h9fx-j6v9 , PYSEC-2026-3558
- cvss
- 7.5
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.5%
- EPSS 0.5% chance of exploitation in 30 days, percentile 46%
- 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. Prior to 0.62.0, datamodel-code-generator resolves JSON Schema $ref targets in src/datamodel_code_generator/parser/jsonschema.py through is_url and _get_ref_body without containing file:// or ../ traversal references to the input directory and without honoring --no-allow-remote-refs, allowing arbitrary local file reads. This issue is fixed in version 0.62.0.
Patch / fix
- pypi datamodel-code-generator 0.62.0
- koxudaxi datamodel-code-generator 0.62.0
Is CVE-2026-55389 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
- yes
- Technical impact
- partial
- Assessed
- 3mo ago
Exploit prediction
0.55% chance of exploitation in the next 30 days, higher than 46% of all scored CVEs (FIRST EPSS, 2026-11-11).
Exploits and checks
- github.com https://github.com/koxudaxi/datamodel-code-generator/security/advisories/GHSA-8359-h9fx-j6v9 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| GitHub | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| OSV | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | datamodel-code-generator | <0.62.0 |
0.62.0 |
Affected products
- koxudaxi datamodel-code-generator
Classification
References
-
github.com
/koxudaxi/datamodel-code-generator/commit/2ff4a72b4550a2b2069754c5b075b1655067e5fb
web, patch
-
github.com
/koxudaxi/datamodel-code-generator/security/advisories/GHSA-8359-h9fx-j6v9
exploit, web, vendor-advisory
-
github.com
/koxudaxi/datamodel-code-generator/releases/tag/0.62.0
web, release-notes
-
github.com
/koxudaxi/datamodel-code-generator
package
-
pypi.org
/project/datamodel-code-generator
package
-
github.com
/advisories/GHSA-8359-h9fx-j6v9
advisory
-
nvd.nist.gov
/vuln/detail/CVE-2026-55389
advisory
-
github.com
/datamodel-code-generator/datamodel-code-generator/security/advisories/GHSA-8359-h9fx-j6v9
advisory
Sources
- CVE List CVE-2026-55389
- GitHub Advisory GHSA-8359-h9fx-j6v9
- NVD CVE-2026-55389
- OSV PYSEC-2026-3558
- Maintainer advisory GHSA-8359-h9fx-j6v9
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.