{"id":"CVE-2025-46816","aliases":["GHSA-rwj2-w85g-5cmm","GO-2025-3672"],"url":"https://o3.security/vulnerability/CVE-2025-46816","summary":"goshs route not protected, allows command execution","details":"### Summary\n\nIt 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**.\n\n### Details\n\nIt seems that the function ```dispatchReadPump``` does not checks the option cli ```-c```, thus allowing anyone to execute arbitrary command through the use of websockets.\n\n### PoC\n\nUsed **websocat** for the POC:\n```bash\necho -e '{\"type\": \"command\", \"content\": \"id\"}' |./websocat 'ws://192.168.1.11:8000/?ws' -t\n```\n\n### Impact\n\nThe vulnerability will only impacts goshs server on vulnerable versions.","published":"2025-05-06T18:41:58.035Z","modified":"2026-08-12T03:51:42.306498001Z","cvss":{"score":9.4,"severity":"CRITICAL","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L"},"epss":null,"cisaKev":null,"exploitsKnown":1,"affectedPackages":[{"ecosystem":"Go","name":"github.com/patrickhener/goshs","fixedVersion":"1.0.5"}],"fix":{"url":"https://github.com/patrickhener/goshs/commit/160220974576afe5111485b8d12fd36058984cfa","label":"patrickhener/goshs@1602209"},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/46xxx/CVE-2025-46816.json"},{"type":"ADVISORY","url":"https://github.com/patrickhener/goshs/security/advisories/GHSA-rwj2-w85g-5cmm"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-46816"},{"type":"FIX","url":"https://github.com/patrickhener/goshs/commit/160220974576afe5111485b8d12fd36058984cfa"},{"type":"PACKAGE","url":"https://github.com/patrickhener/goshs"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-12T03:51:42.306498001Z"}}