All reports
Critical

goshs route not protected, allows command execution

Affected versions

Version ranges need review.

Affected versions
>= 0.3.4, <= 1.0.4
Fixed version
1.0.5
Affected versions
>=0.3.4 <1.0.5
Fixed version
1.0.5

Exploitation

CVE-2025-46816

Probability of exploitation in the next 30 days: 0.75%

FIRST EPSS · 2026-11-24

Description

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:

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.

Links

Credits

  • Guilhem7