<?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>Goshs — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/goshs/</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, 04 Apr 2026 12:00:00 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/tags/goshs/feed.xml" rel="self" type="application/rss+xml"/><item><title>goshs Unauthenticated Arbitrary File Deletion via Path Traversal</title><link>https://feed.craftedsignal.io/briefs/2026-04-goshs-path-traversal/</link><pubDate>Sat, 04 Apr 2026 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-04-goshs-path-traversal/</guid><description>The goshs application is vulnerable to unauthenticated path traversal (CVE-2026-35471) due to a missing return statement in the `deleteFile()` function, allowing attackers to delete arbitrary files and directories using a crafted GET request.</description><content:encoded><![CDATA[<p>The goshs application, a simple static file server written in Go, is vulnerable to a path traversal vulnerability (CVE-2026-35471). This flaw exists within the <code>deleteFile</code> function (<code>httpserver/handler.go</code>) due to a missing <code>return</code> statement after a check for path traversal attempts using <code>..</code>. Specifically, if a request contains double-encoded path traversal sequences (e.g., <code>%252e%252e</code>), the check fails to prevent subsequent file deletion. This vulnerability, present in versions prior to 1.1.5-0.20260401172448-237f3af891a9, allows an unauthenticated attacker to delete arbitrary files and directories on the server. The vulnerability affects default configurations of goshs, requiring no authentication or specific flags to be set.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>The attacker identifies a goshs instance running a vulnerable version (prior to 1.1.5-0.20260401172448-237f3af891a9).</li>
<li>The attacker crafts a GET request to a file path containing double-encoded path traversal sequences (<code>%252e%252e</code>) to bypass the path traversal check in <code>deleteFile()</code>.</li>
<li>The GET request includes the <code>?delete</code> parameter to trigger the file deletion logic.</li>
<li>The <code>deleteFile()</code> function receives the request and decodes the path, but the missing <code>return</code> after the path traversal check allows the execution to continue.</li>
<li>The <code>os.RemoveAll()</code> function is called with the manipulated path, leading to the deletion of arbitrary files or directories outside the intended webroot.</li>
<li>The server responds with HTTP status code 200, even if the file deletion was successful or resulted in an error.</li>
<li>The attacker verifies the deletion of the targeted file/directory.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of this path traversal vulnerability allows an unauthenticated attacker to delete any file or directory accessible to the goshs process. This could lead to data loss, system instability, or complete compromise of the server if critical system files are deleted. While the exact number of vulnerable instances is unknown, any organization using goshs versions prior to 1.1.5-0.20260401172448-237f3af891a9 is at risk.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade to goshs version 1.1.5-0.20260401172448-237f3af891a9 or later to patch CVE-2026-35471.</li>
<li>Deploy the Sigma rule &ldquo;Detect goshs Path Traversal Attempt via URL Encoding&rdquo; to identify ongoing exploitation attempts based on double-encoded path traversal sequences in HTTP requests.</li>
<li>Monitor web server logs for GET requests containing double-encoded &ldquo;..&rdquo; sequences and the &ldquo;?delete&rdquo; parameter, indicative of exploitation attempts.</li>
</ul>
]]></content:encoded><category domain="severity">critical</category><category domain="type">advisory</category><category>path-traversal</category><category>file-deletion</category><category>goshs</category></item><item><title>Goshs Authentication Bypass via Share Token</title><link>https://feed.craftedsignal.io/briefs/2024-01-02-goshs-auth-bypass/</link><pubDate>Wed, 01 Apr 2026 20:58:48 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-02-goshs-auth-bypass/</guid><description>Goshs is vulnerable to an authentication bypass via share tokens, allowing attackers to bypass authentication checks by using a valid share token in conjunction with other functionalities like WebSocket connections to gain unauthorized access and execute arbitrary commands on the server.</description><content:encoded><![CDATA[<p>Goshs versions 1.1.0 and later are susceptible to an authentication bypass vulnerability (CVE-2026-34581) when using share tokens. The vulnerability resides in the <code>BasicAuthMiddleware</code> which prioritizes token validation over credential checks. This allows an attacker with a valid share token to bypass all authentication and access restricted functionalities such as directory listing, file deletion, clipboard access, WebSocket connections, and CLI command execution. A patch is available in version v2.0.0-beta.2. This vulnerability affects systems using goshs where authentication is enabled alongside the share token feature, potentially leading to unauthorized access and command execution.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>A legitimate user creates a share token for a specific file using the goshs web interface or API.</li>
<li>The attacker obtains a valid share token, either through social engineering or other means.</li>
<li>The attacker crafts a malicious request to the goshs server, including the valid share token as a query parameter (e.g., <code>?token=</code>).</li>
<li>The <code>BasicAuthMiddleware</code> in goshs checks for the <code>token</code> parameter first and, upon finding a valid token, bypasses subsequent authentication checks.</li>
<li>The attacker includes a <code>ws</code> parameter in the same request (e.g., <code>?ws&amp;token=</code>), enabling a WebSocket connection.</li>
<li>Using the established WebSocket connection, the attacker sends commands to the server by sending a JSON payload with <code>{&quot;type&quot;:&quot;command&quot;,&quot;Content&quot;:&quot;command_to_execute&quot;}</code>.</li>
<li>The server executes the attacker-supplied command, such as <code>id</code> or <code>cat /etc/passwd</code>.</li>
<li>The attacker receives the output of the executed command via the WebSocket connection, effectively achieving remote code execution.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of this vulnerability (CVE-2026-34581) allows an attacker to bypass authentication, gain unauthorized access to the goshs server, and execute arbitrary commands. This can lead to complete system compromise, data exfiltration, and denial-of-service. Since the vulnerability exists in a widely used web file server, a successful attack could impact numerous organizations using goshs.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade to goshs version v2.0.0-beta.2 or later to patch CVE-2026-34581, as the vulnerability is fixed in that version (<a href="https://github.com/patrickhener/goshs/releases/tag/v2.0.0-beta.2">https://github.com/patrickhener/goshs/releases/tag/v2.0.0-beta.2</a>).</li>
<li>Monitor web server logs for requests containing both <code>token</code> and <code>ws</code> parameters in the query string, which may indicate an attempt to exploit this vulnerability (see the detection rule below).</li>
<li>Implement network monitoring to detect unusual WebSocket connections originating from or destined to the goshs server (see the detection rule below).</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>authentication-bypass</category><category>code-execution</category><category>goshs</category></item></channel></rss>