CVE-2026-55390
HIGH 7.5CVSS 3.1datamodel-code-generator vulnerable to arbitrary local file read via XSD `schemaLocation` (`xs:include`/`xs:import`) path traversal, with no remote-ref gate
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.
- Published
- 28 Jul 2026
- Last modified
- 23 Oct 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Deferred
- Weakness
- CWE-200CWE-22CWE-610
- Also known as
- GHSA-442q-2j6p-642gPYSEC-2026-3556
- Sources
- NVDJSONOSV GHSA-442q-2j6p-642gJSONOSV PYSEC-2026-3556JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| OSV | GitHub | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| OSV | PyPA | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| OSV | PyPI | datamodel-code-generator | >= 0.59.0, < 0.62.0 | 0.62.0 |
References
- https://github.com/koxudaxi/datamodel-code-generator/commit/d2d5cecd9fd3a2a6dbf148bf0740b83a11fc6820 · WEB
- https://github.com/koxudaxi/datamodel-code-generator/releases/tag/0.62.0 · WEB
- https://github.com/koxudaxi/datamodel-code-generator/security/advisories/GHSA-442q-2j6p-642g · WEB
- https://github.com/koxudaxi/datamodel-code-generator · PACKAGE
- https://pypi.org/project/datamodel-code-generator · PACKAGE
- https://github.com/advisories/GHSA-442q-2j6p-642g · ADVISORY
- https://nvd.nist.gov/vuln/detail/CVE-2026-55390 · ADVISORY
History
- 25 Nov 2026 21:04 UTC · NVD: first stored (published 28 Jul 2026)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 4 Aug 2026)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 28 Jul 2026)