First published: Tue May 06 2025(Updated: )
### Summary It seems that when running **goshs** without arguments it is possible for anyone to execute commands on the server. This was tested on version **1.0.4** of **goshs**. The command function was introduced in version **0.3.4**. ### Details It seems that the function ```dispatchReadPump``` does not checks the option cli ```-c```, thus allowing anyone to execute arbitrary command through the use of websockets. ### PoC Used **websocat** for the POC: ```bash echo -e '{"type": "command", "content": "id"}' |./websocat 'ws://192.168.1.11:8000/?ws' -t ``` ### Impact The vulnerability will only impacts goshs server on vulnerable versions.
Credit: security-advisories@github.com
Affected Software | Affected Version | How to fix |
---|---|---|
go/github.com/patrickhener/goshs | >=0.3.4<=1.0.4 | 1.0.5 |
Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.
CVE-2025-46816 has been reported as a high severity vulnerability due to the potential for unauthorized command execution on the server.
To mitigate CVE-2025-46816, upgrade to goshs version 1.0.5 or later.
CVE-2025-46816 affects goshs versions from 0.3.4 up to 1.0.4.
CVE-2025-46816 allows any user to execute arbitrary commands on the server when goshs runs without arguments.
The impact of CVE-2025-46816 on server security is critical as it enables unauthorized command execution, which could lead to system compromise.