<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Koxudaxi - CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/vendors/koxudaxi/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata. Fed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Tue, 28 Jul 2026 21:34:55 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/vendors/koxudaxi/feed.xml" rel="self" type="application/rss+xml"/><item><title>datamodel-code-generator Vulnerable to Arbitrary Local File Read via XSD Path Traversal</title><link>https://feed.craftedsignal.io/briefs/2026-07-datamodel-code-generator-path-traversal/</link><pubDate>Tue, 28 Jul 2026 21:34:55 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-07-datamodel-code-generator-path-traversal/</guid><description>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.</description><content:encoded><![CDATA[<p>Versions 0.59.0 through 0.61.0 of <code>datamodel-code-generator</code>, 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 <code>schemaLocation</code> attributes within <code>&lt;xs:include&gt;</code>, <code>&lt;xs:import&gt;</code>, <code>&lt;xs:redefine&gt;</code>, and <code>&lt;xs:override&gt;</code> elements. This allows an attacker to specify relative paths using <code>../</code> or absolute paths, enabling the <code>datamodel-code-generator</code> 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 <code>--no-allow-remote-refs</code> options do not mitigate this specific XSD-based vector, making it a significant risk for applications and CI pipelines that process untrusted XSD input.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker crafts a malicious XSD file containing an <code>&lt;xs:include&gt;</code> or <code>&lt;xs:import&gt;</code> element with a <code>schemaLocation</code> attribute.</li>
<li>The <code>schemaLocation</code> attribute is set to either a path traversal sequence (e.g., <code>../../etc/passwd</code>) or an absolute path (e.g., <code>/var/log/apache2/access.log</code>).</li>
<li>The 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.</li>
<li>The victim executes <code>datamodel-codegen --input attacker.xsd --input-file-type xmlschema --output generated_models.py</code>.</li>
<li>During the XSD parsing process, <code>datamodel-code-generator</code> resolves the malicious <code>schemaLocation</code>.</li>
<li>Due to the vulnerability, the tool reads the content of the arbitrary local file specified in the <code>schemaLocation</code>.</li>
<li>The content of the sensitive file is then folded into the generated Python output file (<code>generated_models.py</code>).</li>
<li>The attacker subsequently obtains the generated output, thereby exfiltrating the contents of the sensitive local file.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>This vulnerability (CVE-2026-55390) enables arbitrary local file read (CWE-22) leading to significant information disclosure (CWE-200). Any environment that uses <code>datamodel-code-generator</code> 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.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade <code>datamodel-code-generator</code> to version <code>0.62.0</code> or newer immediately to address CVE-2026-55390.</li>
<li>Implement checks to reject resolved <code>schemaLocation</code> targets that are not strictly relative to the base path when processing XSD files in any custom integration.</li>
<li>Ensure 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.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>path-traversal</category><category>information-disclosure</category><category>supply-chain</category><category>vulnerability</category></item><item><title>Datamodel Code Generator Vulnerable to SSRF via URL Parameter</title><link>https://feed.craftedsignal.io/briefs/2026-07-datamodel-code-generator-ssrf/</link><pubDate>Tue, 28 Jul 2026 21:34:03 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-07-datamodel-code-generator-ssrf/</guid><description>The `datamodel-code-generator` tool, specifically versions from `0.9.1` up to `0.60.2`, is vulnerable to Server-Side Request Forgery (SSRF) when using the `--url` argument with the `[http]` extra installed, allowing attackers to access internal network resources and exfiltrate sensitive data into generated Python files.</description><content:encoded><![CDATA[<p>Versions <code>0.9.1</code> through <code>0.60.2</code> of the <code>datamodel-code-generator</code> tool are susceptible to Server-Side Request Forgery (SSRF) when the optional <code>[http]</code> extra is installed. This vulnerability arises because the tool's built-in HTTP fetcher, utilized when the <code>--url</code> command-line argument is supplied, lacks critical validation for host and IP addresses and unconditionally follows HTTP redirects. An attacker can craft a malicious URL that redirects to internal network resources, loopback addresses, private IP ranges, or cloud metadata services like <code>169.254.169.254</code>. If successfully exploited, the tool will fetch content from these internal destinations and embed any sensitive information (e.g., IAM credentials, internal API responses) directly into the generated <code>.py</code> source code. This poses a significant risk of internal network reconnaissance, sensitive data disclosure, and credential exfiltration, particularly if the generated files are committed to a public or attacker-accessible repository. Organizations using <code>datamodel-code-generator</code> should upgrade to version <code>0.61.0</code> or later to mitigate this risk.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker crafts a malicious external URL (e.g., <code>https://attacker.com/schema.json</code>) that issues an HTTP 302 redirect to an internal network resource, a private IP address, or a cloud metadata service (e.g., <code>http://169.254.169.254/latest/meta-data/iam/security-credentials/&lt;role&gt;</code>).</li>
<li>A victim executes the <code>datamodel-code-generator</code> tool, providing the attacker-controlled external URL via the <code>--url</code> command-line argument.</li>
<li>The <code>datamodel-code-generator</code> tool, specifically its <code>http.get_body</code> function, initiates an HTTP GET request to the provided external URL.</li>
<li>The external server responds with an HTTP 302 redirect to the internal target specified by the attacker.</li>
<li>Due to the <code>follow_redirects=True</code> setting and absence of host/IP validation, <code>datamodel-code-generator</code> transparently follows the redirect and fetches content from the sensitive internal resource, effectively bypassing network boundaries.</li>
<li>The response body from the internal resource (e.g., IAM role credentials, confidential internal API responses, or system information) is processed and interpreted as a schema.</li>
<li>Sensitive information extracted from this internal response body is subsequently embedded into the generated Python <code>.py</code> source file, for example, as docstrings, class attributes, or field descriptions.</li>
<li>The generated <code>.py</code> file, now containing the exfiltrated sensitive data, is potentially committed to a version control system, making the internal information accessible to the attacker or a wider audience.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>This SSRF vulnerability can have significant consequences, primarily affecting organizations that use <code>datamodel-code-generator</code> with unverified URLs or within environments where internal services are accessible from development workstations or CI/CD pipelines. The observed damages include internal network reconnaissance through port scanning localhost or private IP ranges, and the disclosure of highly sensitive information. This can involve the exfiltration of cloud IAM credentials from metadata services (e.g., AWS EC2), internal API keys, or proprietary data from intranet applications. If the generated Python files containing this sensitive data are then committed to a repository, it constitutes a direct exfiltration channel, potentially granting attackers access to cloud infrastructure or other critical internal systems.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade <code>datamodel-code-generator</code> to version <code>0.61.0</code> or higher immediately to patch CVE-2026-54691.</li>
<li>Deploy the <code>Detect datamodel-code-generator SSRF attempts to internal IPs</code> Sigma rule to your SIEM to identify suspicious invocations of the tool targeting internal or private IP addresses.</li>
<li>Review existing codebases for <code>datamodel-codegen</code> invocations that use the <code>--url</code> parameter, especially in automated CI/CD pipelines, to ensure URLs are trusted and do not point to attacker-controlled domains or could redirect to internal resources.</li>
<li>Implement source code analysis tools to scan generated <code>.py</code> files for embedded sensitive information (e.g., API keys, credentials, private IPs) that may have resulted from past exploitation of this vulnerability.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>ssrf</category><category>supply-chain</category><category>code-generation</category><category>python</category><category>vulnerability</category></item></channel></rss>