<?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/V2 &lt;= 2.0.6 — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/products/goshs/v2--2.0.6/</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>Fri, 15 May 2026 17:19:20 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/products/goshs/v2--2.0.6/feed.xml" rel="self" type="application/rss+xml"/><item><title>goshs SSH Tunnel Vulnerable to MITM via Insecure Host Key Handling</title><link>https://feed.craftedsignal.io/briefs/2026-05-goshs-mitm/</link><pubDate>Fri, 15 May 2026 17:19:20 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-05-goshs-mitm/</guid><description>The goshs application disables SSH host key verification when using the --tunnel flag, making it vulnerable to man-in-the-middle attacks that expose plaintext HTTP traffic.</description><content:encoded><![CDATA[<p>The goshs application, prior to version 2.0.7, is vulnerable to a man-in-the-middle (MITM) attack when using the <code>--tunnel</code> or <code>-t</code> flag. The application opens an outbound SSH connection to <code>localhost.run:22</code> with host key verification disabled via <code>ssh.InsecureIgnoreHostKey()</code>. This insecure configuration allows an attacker positioned on the network path to intercept the TCP connection, present their own SSH host key, and proxy the connection. Because <code>localhost.run</code> performs TLS termination, the attacker can read and rewrite all HTTP request and response content in plaintext. This vulnerability allows for the exfiltration of sensitive data and modification of served content.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>A user executes <code>goshs --tunnel</code> to create a tunnel.</li>
<li><code>tunnel.Start()</code> initiates an SSH connection to <code>localhost.run:22</code> with <code>InsecureIgnoreHostKey()</code>.</li>
<li>An attacker, positioned on the network path, intercepts the TCP connection to <code>localhost.run:22</code> and responds with a malicious SSH server.</li>
<li>The malicious SSH server presents a fake SSH host key, which the goshs client accepts due to the disabled host key verification.</li>
<li>The attacker proxies the SSH session onward to the real <code>localhost.run:22</code> to retrieve the public URL.</li>
<li>All subsequent HTTP requests to the public URL are routed through the attacker&rsquo;s proxy.</li>
<li>The attacker intercepts all HTTP requests and responses, reading sensitive data such as URLs, headers, authentication credentials, and file contents.</li>
<li>The attacker can modify HTTP responses, inject malicious content, or redirect requests.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>The vulnerability can lead to significant data breaches and compromise of system integrity. All HTTP request and response content, including sensitive information such as URLs, headers, basic authentication credentials, file contents, and share-link tokens, can be read by the attacker. Furthermore, attackers can modify responses in transit, replacing served files, injecting malicious scripts, or substituting binaries with backdoored versions. This poses a high risk to both the confidentiality and integrity of the data being transmitted through the goshs tunnel.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade to goshs version 2.0.7 or later to benefit from the fix that replaces <code>ssh.InsecureIgnoreHostKey()</code> with a TOFU host key verification mechanism.</li>
<li>Monitor network traffic for connections to <code>localhost.run:22</code> originating from goshs processes to detect potential MITM attempts, using the provided Sigma rule.</li>
<li>Regularly inspect the <code>~/.config/goshs/known_hosts</code> file to ensure the host key for <code>localhost.run:22</code> has not been tampered with (after upgrading).</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>mitm</category><category>ssh</category><category>insecure-configuration</category></item></channel></rss>