<?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>Algernon — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/products/algernon/</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, 19 May 2026 14:40:16 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/products/algernon/feed.xml" rel="self" type="application/rss+xml"/><item><title>Algernon handler.lua Discovery Leads to Remote Code Execution</title><link>https://feed.craftedsignal.io/briefs/2026-05-algernon-rce/</link><pubDate>Tue, 19 May 2026 14:40:16 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-05-algernon-rce/</guid><description>Algernon is vulnerable to remote code execution due to unbounded upward directory traversal when searching for `handler.lua`, allowing attackers with write access to parent directories to execute arbitrary code.</description><content:encoded><![CDATA[<p>Algernon is susceptible to a critical remote code execution vulnerability. When a URL path resolves to a directory lacking an index file, Algernon&rsquo;s <code>DirPage</code> function recursively searches parent directories for a <code>handler.lua</code> file. Critically, this search extends beyond the configured server root, creating an opportunity for attackers to inject malicious Lua code. If an attacker can write a <code>handler.lua</code> file to any parent directory of the Algernon server root, that file will be executed with full Algernon API access, including functions like <code>run3()</code>, <code>httpclient</code>, <code>os.execute</code>, and direct database access. This occurs without authentication, as the handler lookup precedes permission checks. This vulnerability impacts any Algernon deployment where a less-trusted principal can write to a parent directory of the server root. The issue was introduced due to an unbounded upward search in the <code>DirPage</code> function, as detailed in the GHSA-xwcr-wm99-g9jc advisory.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>Attacker identifies an Algernon instance and its server root directory.</li>
<li>Attacker gains write access to a parent directory of the server root (e.g., <code>/srv</code>, <code>/tmp</code>, <code>~/</code>).</li>
<li>Attacker crafts a malicious <code>handler.lua</code> file containing arbitrary code for execution.</li>
<li>Attacker writes the malicious <code>handler.lua</code> file to the chosen parent directory.</li>
<li>Attacker sends an HTTP request to the Algernon server, targeting a directory without an <code>index.*</code> file (e.g., <code>/nope/</code>).</li>
<li>Algernon&rsquo;s <code>DirPage</code> function initiates an upward directory search for <code>handler.lua</code>.</li>
<li>The search locates the attacker&rsquo;s malicious <code>handler.lua</code> in a parent directory.</li>
<li>Algernon executes the <code>handler.lua</code> file using a Lua interpreter with full API access, resulting in RCE.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of this vulnerability allows attackers to execute arbitrary code on the Algernon server with the privileges of the Algernon process. This can lead to complete compromise of the server, including data theft, modification, or destruction. Multi-tenant environments are especially at risk, as a compromised tenant could inject a <code>handler.lua</code> that affects other tenants. The scope of the impact is changed, as a write primitive against a parent directory crosses into the Algernon process&rsquo;s authority.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Apply the provided patch to clamp the <code>DirPage</code> directory traversal to the server root as described in the GHSA advisory.</li>
<li>Implement the boundary check in <code>engine/dirhandler.go</code> to prevent traversal beyond the server root as detailed in the fix suggestions.</li>
<li>Deploy the Sigma rule &ldquo;Detect Algernon handler.lua Discovery&rdquo; to identify potential exploitation attempts via web server logs.</li>
<li>Monitor file creation events in parent directories of Algernon server roots for suspicious <code>handler.lua</code> file creations using the &ldquo;Detect handler.lua Creation in Parent Directories&rdquo; rule.</li>
<li>Review and remove any unnecessary <code>handler.lua</code> files present in parent directories of Algernon server roots to reduce the attack surface.</li>
</ul>
]]></content:encoded><category domain="severity">critical</category><category domain="type">advisory</category><category>algernon</category><category>rce</category><category>directory-traversal</category></item></channel></rss>