CVE-2026-55389CWE-200CWE-22CWE-610path-traversalinformation-disclosure

CVE-2026-55389

High · published July 29, 2026

CVSS v3.1
7.5
EPSS
1%
Percentile
45.1
In the wild
Unconfirmed
What it is

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.

The record
Technical detail
CVSS v3.1
7.5 · HIGH
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
CVSS v4.0
Not supplied
EPSS
0.00547 · 45.1th percentile
Weaknesses
CWE-200 · Exposure of Sensitive Information to an Unauthorized Actor; CWE-22 · Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'); CWE-610 · Externally Controlled Reference to a Resource in Another Sphere
Published
2026-07-29T02:17Z
Affected products (1)
ProductVersionsFixed in
koxudaxi/datamodel-code-generator< 0.62.00.62.0
References (4)
EPSS history
Timeline
  • 28 JUL 21:49Z
    datamodel-code-generator vulnerable to arbitrary local file read via JSON-Schema `$ref` (`file://` and `../` traversal), bypassing `--no-allow-remote-refs`
    cvelistv5