High severityNVD Advisory· Published Jul 28, 2026· Updated Jul 29, 2026
Arbitrary local file read via XSD `schemaLocation` (`xs:include`/`xs:import`) path traversal, with no remote-ref gate
CVE-2026-55390
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.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
datamodel-code-generatorPyPI | >= 0.59.0, < 0.62.0 | 0.62.0 |
Affected products
1- Range: 0.59.0 <= 0.62.0
Patches
Vulnerability mechanics
References
4- github.com/advisories/GHSA-442q-2j6p-642gghsaADVISORY
- github.com/koxudaxi/datamodel-code-generator/commit/d2d5cecd9fd3a2a6dbf148bf0740b83a11fc6820ghsax_refsource_MISCWEB
- github.com/koxudaxi/datamodel-code-generator/releases/tag/0.62.0ghsax_refsource_MISCWEB
- github.com/koxudaxi/datamodel-code-generator/security/advisories/GHSA-442q-2j6p-642gghsax_refsource_CONFIRMWEB
News mentions
0No linked articles in our index yet.