{"description":"Trending threats, MITRE ATT\u0026CK coverage, and detection metadata. Fed continuously.","feed_url":"https://feed.craftedsignal.io/products/datamodel-code-generator--0.59.0--0.61.0/feed.json","home_page_url":"https://feed.craftedsignal.io/","items":[{"_cs_actors":[],"_cs_cpes":[],"_cs_cves":[],"_cs_exploited":false,"_cs_has_poc":false,"_cs_poc_references":[],"_cs_products":["datamodel-code-generator (\u003e= 0.59.0, \u003c= 0.61.0)"],"_cs_severities":["high"],"_cs_tags":["path-traversal","information-disclosure","supply-chain","vulnerability"],"_cs_type":"advisory","_cs_vendors":["koxudaxi"],"content_html":"\u003cp\u003eVersions 0.59.0 through 0.61.0 of \u003ccode\u003edatamodel-code-generator\u003c/code\u003e, a tool for generating data models, contain a high-severity path traversal vulnerability (CVE-2026-55390). When processing an attacker-controlled XML Schema Definition (XSD) file, the tool fails to properly sanitize \u003ccode\u003eschemaLocation\u003c/code\u003e attributes within \u003ccode\u003e\u0026lt;xs:include\u0026gt;\u003c/code\u003e, \u003ccode\u003e\u0026lt;xs:import\u0026gt;\u003c/code\u003e, \u003ccode\u003e\u0026lt;xs:redefine\u0026gt;\u003c/code\u003e, and \u003ccode\u003e\u0026lt;xs:override\u0026gt;\u003c/code\u003e elements. This allows an attacker to specify relative paths using \u003ccode\u003e../\u003c/code\u003e or absolute paths, enabling the \u003ccode\u003edatamodel-code-generator\u003c/code\u003e process to read arbitrary files outside the intended project directory. The contents of these external files are subsequently incorporated into the generated Python models, leading to information disclosure. The default configuration is affected, and existing \u003ccode\u003e--no-allow-remote-refs\u003c/code\u003e options do not mitigate this specific XSD-based vector, making it a significant risk for applications and CI pipelines that process untrusted XSD input.\u003c/p\u003e\n\u003ch2 id=\"attack-chain\"\u003eAttack Chain\u003c/h2\u003e\n\u003col\u003e\n\u003cli\u003eAn attacker crafts a malicious XSD file containing an \u003ccode\u003e\u0026lt;xs:include\u0026gt;\u003c/code\u003e or \u003ccode\u003e\u0026lt;xs:import\u0026gt;\u003c/code\u003e element with a \u003ccode\u003eschemaLocation\u003c/code\u003e attribute.\u003c/li\u003e\n\u003cli\u003eThe \u003ccode\u003eschemaLocation\u003c/code\u003e attribute is set to either a path traversal sequence (e.g., \u003ccode\u003e../../etc/passwd\u003c/code\u003e) or an absolute path (e.g., \u003ccode\u003e/var/log/apache2/access.log\u003c/code\u003e).\u003c/li\u003e\n\u003cli\u003eThe attacker convinces a victim to generate models using the malicious XSD file, for instance, by integrating it into a build pipeline or using it in a multi-tenant environment.\u003c/li\u003e\n\u003cli\u003eThe victim executes \u003ccode\u003edatamodel-codegen --input attacker.xsd --input-file-type xmlschema --output generated_models.py\u003c/code\u003e.\u003c/li\u003e\n\u003cli\u003eDuring the XSD parsing process, \u003ccode\u003edatamodel-code-generator\u003c/code\u003e resolves the malicious \u003ccode\u003eschemaLocation\u003c/code\u003e.\u003c/li\u003e\n\u003cli\u003eDue to the vulnerability, the tool reads the content of the arbitrary local file specified in the \u003ccode\u003eschemaLocation\u003c/code\u003e.\u003c/li\u003e\n\u003cli\u003eThe content of the sensitive file is then folded into the generated Python output file (\u003ccode\u003egenerated_models.py\u003c/code\u003e).\u003c/li\u003e\n\u003cli\u003eThe attacker subsequently obtains the generated output, thereby exfiltrating the contents of the sensitive local file.\u003c/li\u003e\n\u003c/ol\u003e\n\u003ch2 id=\"impact\"\u003eImpact\u003c/h2\u003e\n\u003cp\u003eThis vulnerability (CVE-2026-55390) enables arbitrary local file read (CWE-22) leading to significant information disclosure (CWE-200). Any environment that uses \u003ccode\u003edatamodel-code-generator\u003c/code\u003e to process untrusted XML Schema Definition (XSD) files is at risk. This includes development workflows, CI/CD pipelines, and multi-tenant services where an attacker can supply an XSD. Attackers can read sensitive files such as configuration files, source code, private keys, or system credentials. While verbatim disclosure is guaranteed for XML/XSD-shaped data, the tool reads raw bytes of any file, making it a potent primitive for arbitrary file access. The compromised data, once incorporated into generated models, can be exfiltrated via various means, such as being committed to a repository, logged, or returned by a service.\u003c/p\u003e\n\u003ch2 id=\"recommendation\"\u003eRecommendation\u003c/h2\u003e\n\u003cul\u003e\n\u003cli\u003eUpgrade \u003ccode\u003edatamodel-code-generator\u003c/code\u003e to version \u003ccode\u003e0.62.0\u003c/code\u003e or newer immediately to address CVE-2026-55390.\u003c/li\u003e\n\u003cli\u003eImplement checks to reject resolved \u003ccode\u003eschemaLocation\u003c/code\u003e targets that are not strictly relative to the base path when processing XSD files in any custom integration.\u003c/li\u003e\n\u003cli\u003eEnsure that any automated systems or services processing untrusted XSD files run with the principle of least privilege, limiting their access to sensitive file system locations.\u003c/li\u003e\n\u003c/ul\u003e\n","date_modified":"2026-07-28T21:34:55Z","date_published":"2026-07-28T21:34:55Z","id":"https://feed.craftedsignal.io/briefs/2026-07-datamodel-code-generator-path-traversal/","summary":"datamodel-code-generator versions 0.59.0 through 0.61.0 are vulnerable to an unauthenticated path traversal and information disclosure issue, allowing an attacker to read arbitrary local files on the system where the code generator is executed by crafting a malicious XML Schema (XSD) `schemaLocation` attribute, with the contents of the files then incorporated into the generated output.","title":"datamodel-code-generator Vulnerable to Arbitrary Local File Read via XSD Path Traversal","url":"https://feed.craftedsignal.io/briefs/2026-07-datamodel-code-generator-path-traversal/"}],"language":"en","title":"CraftedSignal Threat Feed - Datamodel-Code-Generator (\u003e= 0.59.0, \u003c= 0.61.0)","version":"https://jsonfeed.org/version/1.1"}