CVE-2026-34581
Received Received - Intake
Authentication Bypass in goshs Allows Remote Code Execution

Publication date: 2026-04-02

Last updated on: 2026-04-15

Assigner: GitHub, Inc.

Description
goshs is a SimpleHTTPServer written in Go. From version 1.1.0 to before version 2.0.0-beta.2, when using the Share Token it is possible to bypass the limited selected file download with all the gosh functionalities, including code exec. This issue has been patched in version 2.0.0-beta.2.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-04-02
Last Modified
2026-04-15
Generated
2026-05-07
AI Q&A
2026-04-02
EPSS Evaluated
2026-05-05
NVD
Affected Vendors & Products
Showing 2 associated CPEs
Vendor Product Version / Range
goshs goshs From 1.1.0 (inc) to 2.0.0 (exc)
goshs goshs 2.0.0
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-288 The product requires authentication, but the product has an alternate path or channel that does not require authentication.
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

CVE-2026-34581 is a critical authentication bypass vulnerability in the Go module "goshs" versions 1.1.0 through before 2.0.0-beta.2. The issue arises because the BasicAuthMiddleware checks for a URL query parameter `?token=` before performing standard authentication. If the token exists in the SharedLinks map, the middleware bypasses all authentication checks entirely and grants full access.

This means that possession of a valid share token, which was originally intended only for limited, single-file, time-restricted downloads, allows an attacker to access all goshs functionalities without restriction. These functionalities include directory listing, file deletion, clipboard access, WebSocket connections, and command-line interface command execution.

The vulnerability can be exploited remotely over the network with low attack complexity, requires no privileges, and no user interaction other than having the token.


How can this vulnerability impact me? :

An attacker who obtains a valid share token can bypass all authentication and gain unauthorized full access to the goshs server functionalities.

  • They can list directories and access files beyond the intended limited download.
  • They can delete files on the server.
  • They can access the clipboard.
  • They can establish WebSocket connections and execute arbitrary shell commands remotely.

This leads to a complete compromise of the confidentiality and integrity of the system, potentially exposing sensitive data and allowing malicious control over the server.


How can this vulnerability be detected on my network or system? Can you suggest some commands?

This vulnerability can be detected by checking for unauthorized use of the share token in URL query parameters, specifically the presence of `?token=` in requests to the goshs server. Since possession of a valid share token allows bypassing authentication and executing commands, monitoring network traffic for requests containing `?token=` followed by suspicious activity such as WebSocket connections or CLI command executions can indicate exploitation attempts.

Commands to detect exploitation attempts might include network traffic inspection tools like tcpdump or Wireshark to filter HTTP requests containing `?token=` parameters, for example:

  • tcpdump -A -s 0 'tcp port 80 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)' | grep '?token='

Additionally, reviewing server logs for requests with `?token=` parameters and any unusual WebSocket connections or CLI command executions can help detect exploitation.


What immediate steps should I take to mitigate this vulnerability?

The immediate step to mitigate this vulnerability is to upgrade the goshs server to version 2.0.0-beta.2 or later, where the authentication bypass issue has been patched.

Until the upgrade can be performed, restrict access to the goshs server to trusted networks or users, and monitor for any suspicious use of share tokens in URL parameters.

Additionally, consider disabling or limiting the use of share tokens if possible, to reduce the risk of unauthorized access.


How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:

The vulnerability in goshs allows an attacker with a valid share token to bypass authentication entirely and gain unauthorized full access to all server functionalities, including executing arbitrary commands. This leads to a complete compromise of confidentiality and integrity of the system.

Such a compromise of confidentiality and integrity can negatively impact compliance with common standards and regulations like GDPR and HIPAA, which require strict controls to protect sensitive data and ensure system integrity.

Because the vulnerability allows unauthorized access and potential data exposure or manipulation, affected organizations may face increased risk of non-compliance with these regulations.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart