FlawAtlas
Search the atlas
CVE-2025-46816 Critical

goshs route not protected, allows command execution in github.com/patrickhener/goshs

goshs route not protected, allows command execution in github.com/patrickhener/goshs

Exploit probability 0.7%
Published May 15, 2025
Required by Not available
Last source change March 3, 2026

02 / AFFECTED SOFTWARE

Affected packages

Unknown Unknown

14 explicit affected versions

Go github.com/patrickhener/goshs
Go github.com/patrickhener/goshs

03 / CONNECTIONS

Connected vulnerabilities

04 / EVIDENCE

Source records

Open Source Vulnerabilities CVE-2025-46816

goshs is a SimpleHTTPServer written in Go. Starting in version 0.3.4 and prior to version 1.0.5, running goshs without arguments makes it possible for anyone to execute commands on the server. The function `dispatchReadPump` does not checks the option cli `-c`, thus allowing anyone to execute arbitrary command through the use of websockets. Version 1.0.5 fixes the issue.

View original source
Open Source Vulnerabilities GO-2025-3672

goshs route not protected, allows command execution in github.com/patrickhener/goshs

View original source
Open Source Vulnerabilities GHSA-rwj2-w85g-5cmm

### 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.

View original source

05 / REFERENCES

Further evidence