<?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>Dalfox &lt;= 2.12.0 — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/products/dalfox--2.12.0/</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, 12 May 2026 15:10:46 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/products/dalfox--2.12.0/feed.xml" rel="self" type="application/rss+xml"/><item><title>Dalfox Server Mode Unauthenticated Arbitrary File Create/Append Vulnerability</title><link>https://feed.craftedsignal.io/briefs/2026-05-dalfox-file-write/</link><pubDate>Tue, 12 May 2026 15:10:46 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-05-dalfox-file-write/</guid><description>Dalfox in REST API server mode is vulnerable to CVE-2026-45089, an unauthenticated arbitrary file create/append vulnerability, due to the `output`, `output-all`, and `debug` options being deserialized directly from the attacker's request body, allowing a network caller to create or append to any file writable by the dalfox process.</description><content:encoded><![CDATA[<p>Dalfox, a cross-platform vulnerability scanner, is susceptible to an unauthenticated arbitrary file create/append vulnerability (CVE-2026-45089) when run in REST API server mode. This vulnerability stems from the insecure handling of the <code>output</code>, <code>output-all</code>, and <code>debug</code> fields within the <code>model.Options</code> struct. These fields are directly deserialized from the JSON request body of an attacker without proper sanitization, and then propagated into the scan engine&rsquo;s logging path. Consequently, an attacker can create or append to any file on the host filesystem accessible to the dalfox process by sending a crafted POST request to the <code>/scan</code> endpoint. The default configuration lacks API key authentication, compounding the risk. This affects dalfox versions 2.12.0 and earlier.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker sends a POST request to the <code>/scan</code> endpoint of the dalfox REST API server.</li>
<li>The request body contains a JSON object with the <code>url</code> field set to the scan target and the <code>options</code> field containing attacker-controlled values for <code>output</code>, <code>output-all</code>, and <code>debug</code>.</li>
<li>The <code>postScanHandler</code> function binds the JSON request body to a <code>Req</code> struct, which includes the <code>Options</code> field of type <code>model.Options</code>.</li>
<li>The <code>ScanFromAPI</code> function is called with the attacker-supplied <code>URL</code> and <code>Options</code> values.</li>
<li>The <code>Initialize</code> function copies the attacker-controlled <code>OutputFile</code>, <code>OutputAll</code>, and <code>Debug</code> values from the <code>Options</code> struct into a new <code>newOptions</code> struct.</li>
<li>The <code>DalLog</code> function is called to write log messages. Critically, the file write operation using <code>os.OpenFile(options.OutputFile, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644)</code> occurs outside the <code>IsLibrary</code> check.</li>
<li>The attacker-specified file path is opened in append mode, and log messages are written to it. The URL parameter is also written verbatim in the logs, allowing partial content control.</li>
<li>The attacker achieves arbitrary file creation or append on the dalfox host, leading to potential system compromise.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation allows an attacker to create new files or append data to existing files on the dalfox host, provided the dalfox process has the necessary write permissions. This can lead to various impacts, including: arbitrary file creation (e.g., creating web shells in web-serving directories), arbitrary file append/corruption (e.g., corrupting application configuration files or cron entries), and potential remote code execution if the attacker can inject malicious content into a configuration file or script that is subsequently executed. The lack of authentication by default increases the severity, as any network-accessible dalfox instance is vulnerable.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Deploy the Sigma rule <code>Detect Dalfox Unauthenticated File Write Attempt</code> to identify attempts to exploit this vulnerability by monitoring for POST requests to the /scan endpoint with suspicious <code>output</code> parameters.</li>
<li>Apply the recommended remediation by nullifying filesystem-dangerous fields from API-sourced requests in the <code>postScanHandler</code> function as outlined in the advisory. This includes setting <code>rq.Options.OutputFile = &quot;&quot;</code> before calling <code>ScanFromAPI</code>.</li>
<li>As a defense-in-depth measure, guard the file write operation with <code>IsLibrary</code> in the <code>DalLog</code> function, ensuring that file writes only occur in non-library (CLI) mode.</li>
<li>Enforce the use of the <code>--api-key</code> option at server startup, making authentication mandatory for the REST API server.</li>
<li>Upgrade to a patched version of dalfox that incorporates these security fixes.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>xss</category><category>file-write</category><category>unauthenticated</category><category>CVE-2026-45089</category></item></channel></rss>