Advisory Database
  • Advisories
  • Dependency Scanning
  1. golang
  2. ›
  3. goshs.de/goshs/v2
  4. ›
  5. GHSA-mxg3-432p-mr72

GHSA-mxg3-432p-mr72: goshs: SSH host key verification disabled, allowing transparent MITM of every tunnelled HTTP request

May 15, 2026

The --tunnel / -t flag opens an outbound SSH connection to localhost.run:22 with HostKeyCallback: ssh.InsecureIgnoreHostKey(). The Go documentation for that function states verbatim: “It should not be used for production code.” With the callback disabled the client accepts any host key the server presents, so an attacker who can intercept the operator’s TCP connection to localhost.run:22 (any router on the path, malicious local network, ARP/DNS spoof on the operator’s LAN, BGP hijack, malicious VPN) can present their own SSH host key, terminate the SSH session locally, and proxy onward — sitting transparently in the middle of the tunnel.

Because localhost.run does TLS termination at their end, the HTTP traffic on the SSH leg is plaintext, so the on-path attacker reads and rewrites every request and response in cleartext. The goshs operator gets no warning; the public URL works normally.

References

  • github.com/advisories/GHSA-mxg3-432p-mr72
  • github.com/patrickhener/goshs/commit/8f409cb08aacc6e94704334e8b1fb2cd50f5dd98
  • github.com/patrickhener/goshs/releases/tag/v2.0.7
  • github.com/patrickhener/goshs/security/advisories/GHSA-mxg3-432p-mr72

Code Behaviors & Features

Detect and mitigate GHSA-mxg3-432p-mr72 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 2.0.7

Fixed versions

  • 2.0.7

Solution

Upgrade to version 2.0.7 or above.

Impact 7.4 HIGH

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N

Learn more about CVSS

Weakness

  • CWE-295: Improper Certificate Validation
  • CWE-322: Key Exchange without Entity Authentication

Source file

go/goshs.de/goshs/v2/GHSA-mxg3-432p-mr72.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Tue, 23 Jun 2026 12:22:48 +0000.