Impact
datamodel-code-generator is a tool that produces Python data models from schema files. In versions 0.59.0 through 0.61.x the XML schema parser resolves xs:include, xs:import, xs:redefine, and xs:override schemaLocation references outside the input base directory, allowing an adversary to read any local file and embed its contents into the generated model, resulting in information disclosure and corresponding to CWE‑200, CWE‑22, and CWE‑610.
Affected Systems
The affected product is datamodel-code-generator from koxudaxi. Versions 0.59.0 to 0.61.x inclusive are vulnerable; the issue was fixed in 0.62.0 and later.
Risk and Exploitability
The vulnerability receives a CVSS score of 7.5, indicating a high severity for confidentiality impact. The EPSS score is less than 1%, suggesting a low probability of exploitation. Because the flaw requires the ability to supply a crafted XML schema to the generator, the attack vector is local; any user who can invoke datamodel-code-generator can use a malicious schemaLocation to read arbitrary files. The issue is not listed in the CISA KEV catalog, and there are no known public exploits, but the potential for sensitive data leakage warrants immediate action.
OpenCVE Enrichment
Github GHSA