<?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>Yeswiki — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/yeswiki/</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>Sat, 18 Apr 2026 01:00:30 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/tags/yeswiki/feed.xml" rel="self" type="application/rss+xml"/><item><title>YesWiki Authenticated SQL Injection Vulnerability</title><link>https://feed.craftedsignal.io/briefs/2024-01-24-yeswiki-sqli/</link><pubDate>Sat, 18 Apr 2026 01:00:30 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-24-yeswiki-sqli/</guid><description>YesWiki is vulnerable to authenticated SQL Injection via the id_fiche parameter in the EntryManager::formatDataBeforeSave() function, allowing attackers to inject arbitrary SQL commands and potentially extract sensitive data.</description><content:encoded><![CDATA[<p>YesWiki versions 4.6.0 and earlier are vulnerable to SQL injection in the bazar module. This vulnerability exists in <code>tools/bazar/services/EntryManager.php</code> within the <code>formatDataBeforeSave()</code> function. The <code>$data['id_fiche']</code> value, derived from the <code>$_POST['id_fiche']</code> parameter, is directly concatenated into a raw SQL query without proper sanitization. An authenticated attacker can exploit this by sending a crafted POST request to the <code>/api/entries/{formId}</code> endpoint. Successful exploitation enables time-based blind SQL injection, potentially leading to complete database compromise. The vulnerability was confirmed using a Docker PoC demonstrating the ability to induce a time delay using the SLEEP() function within the injected SQL.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>Attacker authenticates to the YesWiki application as any user. This requires a valid <code>wikini_session</code> cookie.</li>
<li>Attacker crafts a POST request to <code>/api/entries/{formId}</code>, where <code>{formId}</code> is the ID of an existing bazar form.</li>
<li>The POST request includes the <code>id_fiche</code> parameter with a malicious SQL payload, such as <code>' OR SLEEP(3) OR '</code>.</li>
<li><code>ApiController::createEntry()</code> processes the request and calls <code>isEntry($_POST['id_fiche'])</code>.</li>
<li>Since the injected SQL will likely not correspond to an existing entry, the <code>create()</code> method is invoked.</li>
<li>The <code>create()</code> method calls <code>formatDataBeforeSave()</code>, which contains the SQL injection vulnerability at line 704 in <code>EntryManager.php</code>.</li>
<li>The injected SQL payload is executed by the database server via <code>dbService-&gt;loadSingle()</code>, without proper escaping or parameterization.</li>
<li>If successful, the attacker can extract sensitive information from the database, such as usernames, passwords, and other confidential data. They can also modify data within the database.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of this SQL injection vulnerability can lead to the complete compromise of the YesWiki database. This includes the potential to access and exfiltrate sensitive data, such as user credentials, configuration details, and business-critical information. Attackers can also modify or delete data, leading to data integrity issues and service disruption. Since any authenticated user can trigger the vulnerability, the impact is widespread. The vulnerability affects composer/yeswiki/yeswiki versions 4.6.0 and earlier.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Apply the provided patch in <code>tools/bazar/services/EntryManager.php</code> by escaping the <code>$data['id_fiche']</code> value before using it in the SQL query (see Proposed Fix in Content section).</li>
<li>Deploy the Sigma rule &ldquo;Detect YesWiki SQL Injection Attempt via API Entries&rdquo; to detect attempts to exploit this vulnerability via suspicious <code>id_fiche</code> POST data.</li>
<li>Monitor web server logs for POST requests to <code>/api/entries/*</code> with unusually long or complex <code>id_fiche</code> parameters, as this could indicate a SQL injection attempt.</li>
<li>Review and audit all database queries within the YesWiki application to identify and remediate any other potential SQL injection vulnerabilities.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>yeswiki</category><category>sql-injection</category><category>web-application</category></item></channel></rss>