CVE-2026-55390 Details
Description
datamodel-code-generator generates Python data models from schema definitions. From 0.59.0 until 0.62.0, XML Schema parsing in src/datamodel_code_generator/parser/xmlschema.py for --input-file-type xmlschema resolves xs:include, xs:import, xs:redefine, and xs:override schemaLocation values outside the input base path, allowing arbitrary local files to be read and reflected into generated models. This issue is fixed in version 0.62.0.
A path traversal vulnerability allowing arbitrary local file reads has been identified in datamodel-code-generator versions 0.59.0 prior to 0.62.0. The issue arises in the XML Schema parsing component, specifically within the 'src/datamodel_code_generator/parser/xmlschema.py' file. When the tool processes XML Schema files, it resolves 'schemaLocation' attributes from 'xs:include', 'xs:import', 'xs:redefine', and 'xs:override' elements. This resolution is performed without restrictions, allowing attackers to read files outside the designated input directory by exploiting relative or absolute paths. The contents of the included files are then incorporated into the generated Python data models, potentially leading to unauthorized information disclosure.
Users are advised to update datamodel-code-generator to version 0.62.0 or later, where this vulnerability has been fixed. Instructions for updating can be found in the GitHub repository's release notes.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Jul 28, 2026CISA-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.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/koxudaxi/datamodel-code-generator/security/advisories/GHSA-442q-2j6p-642g | CISA-ADP | AdvisoryExploitRemedyVendor |
| https://github.com/koxudaxi/datamodel-code-generator/commit/d2d5cecd9fd3a2a6dbf148bf0740b83a11fc6820 | [email protected] | Source CodeVendor |
| https://github.com/koxudaxi/datamodel-code-generator/releases/tag/0.62.0 | [email protected] | Release NotesVendor |
| https://github.com/koxudaxi/datamodel-code-generator/security/advisories/GHSA-442q-2j6p-642g | [email protected] | AdvisoryExploitRemedyVendor |
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.59.0, <= 0.61.0 (semver) |
CPE
Remediation
| |
Change History
2 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jul 29, 2026 | CVE Modified | CISA-ADP |
| Jul 28, 2026 | New CVE Received | [email protected] |
Volerion