CVE-2026-55389 Details
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. 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.
A vulnerability in datamodel-code-generator prior to version 0.62.0 allows arbitrary local file reads through JSON Schema $ref references. The issue arises because the tool does not properly restrict file references to the input directory and ignores the --no-allow-remote-refs option. This flaw can be exploited using file:// URLs or relative references that traverse directories, bypassing intended security controls. As a result, an attacker can read any file accessible to the process user, potentially disclosing sensitive information such as secrets or internal schema data.
Users can update to datamodel-code-generator version 0.62.0 or later, where this vulnerability has been fixed. The update ensures that file references are properly validated and that the --no-allow-remote-refs option applies to file:// URLs, blocking unsafe references outside the input directory.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Jul 29, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-200 | Exposure of Sensitive Information to an Unauthorized Actor | [email protected] |
| CWE-22 | Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') | [email protected] |
| CWE-610 | Externally Controlled Reference to a Resource in Another Sphere | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| koxudaxi datamodel-code-generator | < 0.62.0 |
CPE
Remediation
| |
Change History
3 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Aug 6, 2026 | Initial Analysis | [email protected] |
| Jul 29, 2026 | CVE Modified | CISA-ADP |
| Jul 28, 2026 | New CVE Received | [email protected] |