CVE-2026-55390 Arbitrary local file read via XSD `schemaLocation` (`xs:include`/`xs:import`) path traversal, with no remote-ref gate
HighCVSS 7.5
EPSS 0.55%
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- Proof of concept public · automatable: yes · technical impact: partial
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.
Upgrade path
2 packages: 1 fixed.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| pypi datamodel-code-generator(PyPI) | = 0.59.0; = 0.59.1; = 0.60.0; = 0.60.1 +4 more | 0.62.0 | Fixed |
| koxudaxi datamodel-code-generator | = >= 0.59.0, < 0.62.0 | No fix listed | Versions listed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| pypi datamodel-code-generator(PyPI) | >= 0.59.0, < 0.62.0 | 0.62.0 |
| pypi datamodel-code-generator(PyPI) | = 0.59.0 | No fix listed |
| pypi datamodel-code-generator(PyPI) | = 0.59.1 | No fix listed |
| pypi datamodel-code-generator(PyPI) | = 0.60.0 | No fix listed |
| pypi datamodel-code-generator(PyPI) | = 0.60.1 | No fix listed |
| pypi datamodel-code-generator(PyPI) | = 0.60.2 | No fix listed |
| pypi datamodel-code-generator(PyPI) | = 0.61.0 | No fix listed |
| koxudaxi datamodel-code-generator | = >= 0.59.0, < 0.62.0 | No fix listed |
| pypi datamodel-code-generator(PyPI) | >= 0.59.0, <= 0.61.0 | No fix listed |
References
- https://github.com/koxudaxi/datamodel-code-generator/security/advisories/GHSA-442q-2j6p-642g exploit vendor-advisory
- https://github.com/koxudaxi/datamodel-code-generator/commit/d2d5cecd9fd3a2a6dbf148bf0740b83a11fc6820 patch
- github.com product
- https://github.com/koxudaxi/datamodel-code-generator/releases/tag/0.62.0
- pypi.org product
- github.com vendor-advisory
- nvd.nist.gov vendor-advisory