


Perceptive Security
SOC/SIEM Consultancy

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/pars…
Published:
28 July 2026 at 00:00:00
Alert date:
29 July 2026 at 01:04:30
Source:
nvd.nist.gov
Supply Chain & Dependencies, Web Technologies
CVE-2026-55390 affects the datamodel-code-generator Python library, which generates data models from schema definitions. Versions 0.59.0 through 0.62.0 are vulnerable to an arbitrary file read issue in the XML Schema parsing component. The vulnerability arises because xs:include, xs:import, xs:redefine, and xs:override schemaLocation values are resolved outside the intended input base path. This allows attackers to craft malicious XML schema files that cause the tool to read arbitrary local files. The contents of those files are then reflected into generated Python models, potentially exposing sensitive data. The affected code resides in src/datamodel_code_generator/parser/xmlschema.py and is triggered via the --input-file-type xmlschema flag. The vulnerability has been patched in version 0.62.0. Users are advised to upgrade immediately to mitigate the risk of local file disclosure.
Technical details
Mitigation steps:
Affected products:
datamodel-code-generator 0.59.0 - 0.61.x
Related links:
https://nvd.nist.gov/vuln/detail/CVE-2026-55390
https://github.com/koxudaxi/datamodel-code-generator/commit/d2d5cecd9fd3a2a6dbf148bf0740b83a11fc6820
https://github.com/koxudaxi/datamodel-code-generator/releases/tag/0.62.0
https://github.com/koxudaxi/datamodel-code-generator/security/advisories/GHSA-442q-2j6p-642g
Related CVE's:
Related threat actors:
IOC's:
This article was created with the assistance of AI technology by Perceptive.
