CVE-2026-55390: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in koxudaxi datamodel-code-generator
A path traversal vulnerability exists in koxudaxi datamodel-code-generator versions 0.59.0 through 0.61.x. The XML Schema parser improperly resolves schemaLocation values outside the input base path, allowing reading of arbitrary local files. This issue is fixed in version 0.62.0.
AI Analysis
Technical Summary
The datamodel-code-generator tool, used to generate Python data models from schema definitions, contains a path traversal vulnerability (CWE-22) in its XML Schema parsing component (src/datamodel_code_generator/parser/xmlschema.py) when processing --input-file-type xmlschema. Specifically, from versions 0.59.0 up to but not including 0.62.0, the parser resolves xs:include, xs:import, xs:redefine, and xs:override schemaLocation attributes without restricting them to the input base path. This allows an attacker to cause the tool to read arbitrary local files and reflect their contents into the generated models. The vulnerability is tracked as CVE-2026-55390 with a CVSS 3.1 score of 7.5 (high severity). The issue is fixed starting with version 0.62.0.
Potential Impact
An attacker can exploit this vulnerability to read arbitrary local files on the system where datamodel-code-generator is run, potentially exposing sensitive information. The vulnerability does not affect integrity or availability but has a high confidentiality impact. There are no known exploits in the wild at this time.
Mitigation Recommendations
Upgrade datamodel-code-generator to version 0.62.0 or later, where this path traversal vulnerability is fixed. No other mitigation or temporary workaround is indicated. Patch status is confirmed by the fixed version 0.62.0.
CVE-2026-55390: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in koxudaxi datamodel-code-generator
Description
A path traversal vulnerability exists in koxudaxi datamodel-code-generator versions 0.59.0 through 0.61.x. The XML Schema parser improperly resolves schemaLocation values outside the input base path, allowing reading of arbitrary local files. This issue is fixed in version 0.62.0.
CVSS v3.1
Score 7.5high
Affected software
koxudaxi
datamodel-code-generator
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The datamodel-code-generator tool, used to generate Python data models from schema definitions, contains a path traversal vulnerability (CWE-22) in its XML Schema parsing component (src/datamodel_code_generator/parser/xmlschema.py) when processing --input-file-type xmlschema. Specifically, from versions 0.59.0 up to but not including 0.62.0, the parser resolves xs:include, xs:import, xs:redefine, and xs:override schemaLocation attributes without restricting them to the input base path. This allows an attacker to cause the tool to read arbitrary local files and reflect their contents into the generated models. The vulnerability is tracked as CVE-2026-55390 with a CVSS 3.1 score of 7.5 (high severity). The issue is fixed starting with version 0.62.0.
Potential Impact
An attacker can exploit this vulnerability to read arbitrary local files on the system where datamodel-code-generator is run, potentially exposing sensitive information. The vulnerability does not affect integrity or availability but has a high confidentiality impact. There are no known exploits in the wild at this time.
Mitigation Recommendations
Upgrade datamodel-code-generator to version 0.62.0 or later, where this path traversal vulnerability is fixed. No other mitigation or temporary workaround is indicated. Patch status is confirmed by the fixed version 0.62.0.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-06-16T18:57:40.183Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 6a6921519c2644c7f83dbfaa
Added to database: 07/28/2026, 21:38:25 UTC
Last enriched: 08/05/2026, 15:03:29 UTC
Last updated: 09/12/2026, 10:01:32 UTC
Views: 75
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.