<?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>YAFNET.Core (&lt;= 4.0.4) — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/products/yafnet.core--4.0.4/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata — refreshed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Wed, 03 Jan 2024 18:21:00 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/products/yafnet.core--4.0.4/feed.xml" rel="self" type="application/rss+xml"/><item><title>YAFNET Pre-Handler Authorization Bypass Leads to SQL Injection</title><link>https://feed.craftedsignal.io/briefs/2024-01-yafnet-sqli/</link><pubDate>Wed, 03 Jan 2024 18:21:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-yafnet-sqli/</guid><description>YAFNET's flawed authorization allows low-privileged users to execute arbitrary SQL commands via the `/Admin/RunSql` endpoint, potentially leading to data exfiltration, application modification, and denial-of-service.</description><content:encoded><![CDATA[<p>YAFNET, a forum software, contains a critical vulnerability (CVE-2026-43937) related to its administrative authorization process. The <code>PageSecurityCheckAttribute</code>, intended to restrict access to admin functions, executes after the page handler, failing to prevent unauthorized actions. This flaw allows even low-privileged, registered users to access the <code>/Admin/RunSql</code> endpoint, which directly passes user-supplied input to the <code>IDbAccess.RunSql</code> function without proper validation. This results in blind SQL injection, allowing attackers to execute arbitrary SQL queries against the application database. The vulnerability affects YAFNET Core versions 4.0.4 and earlier. Exploitation is straightforward, requiring only a registered forum account and a single HTTP POST request, making it highly likely to be exploited.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>A low-privileged user registers or logs into the YAFNET forum.</li>
<li>The user obtains a valid <code>__RequestVerificationToken</code> and session cookies from any rendered page.</li>
<li>The attacker crafts a malicious HTTP POST request to <code>/Admin/RunSql?handler=RunQuery</code>.</li>
<li>The POST request includes a URL-encoded SQL payload in the <code>Editor</code> parameter, designed for blind SQL injection.</li>
<li>The <code>PageSecurityCheckAttribute</code> fails to prevent execution of the <code>OnPostRunQuery</code> handler due to its late execution timing.</li>
<li>The <code>OnPostRunQuery</code> handler passes the unsanitized <code>Editor</code> value directly to <code>IDbAccess.RunSql</code>.</li>
<li>The attacker uses a time-based SQL injection technique, such as <code>WAITFOR DELAY</code>, to determine the output of SQL queries.</li>
<li>The attacker exfiltrates sensitive data, modifies forum data, or performs a denial-of-service attack by manipulating the database.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation allows attackers with minimal privileges to gain full control over the application database, including sensitive user data, forum configurations, and identity stores. This can lead to full loss of Confidentiality, Integrity, and Availability. The impact escalates if the underlying SQL Server instance has <code>xp_cmdshell</code> or CLR integration enabled, potentially leading to OS-level command execution. Given the ease of exploitation and the severity of the potential impact, this vulnerability presents a significant risk to YAFNET deployments.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Implement the suggested remediation from the advisory by converting <code>PageSecurityCheckAttribute</code> to an <code>IAsyncPageFilter</code> to enforce authorization before handler execution.</li>
<li>Restrict <code>/Admin/RunSql</code> access to <code>HostAdmin</code> users only and implement a statement-type allow-list on <code>IDbAccess.RunSql</code> to prevent non-read-only SQL execution.</li>
<li>Deploy the Sigma rule <code>Detect YAFNET SQL Injection Attempt</code> to identify malicious SQL payloads within HTTP POST requests to <code>/Admin/RunSql</code>.</li>
<li>Enable webserver logging to capture HTTP POST requests for analysis and detection using the provided Sigma rule.</li>
<li>Patch YAFNET to a version beyond 4.0.4 to remediate CVE-2026-43937.</li>
</ul>
]]></content:encoded><category domain="severity">critical</category><category domain="type">advisory</category><category>sql-injection</category><category>web-application</category><category>vulnerability</category></item></channel></rss>