{"id":"CVE-2025-46816","aliases":["CVE-2025-46816","GHSA-rwj2-w85g-5cmm","GO-2025-3672"],"related":[],"kind":"vulnerability","state":"published","title":"goshs route not protected, allows command execution","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### 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.","format":"markdown","source":"ghsa"},{"lang":"en","text":"goshs route not protected, allows command execution in github.com/patrickhener/goshs","format":"markdown","source":"go"},{"lang":"es","text":"goshs es un SimpleHTTPServer escrito en Go. A partir de la versión 0.3.4 y anteriores a la 1.0.5, ejecutar goshs sin argumentos permite que cualquiera pueda ejecutar comandos en el servidor. La función `dispatchReadPump` no verifica la opción `-c` de la CLI, lo que permite que cualquiera ejecute cualquier comando mediante websockets. La versión 1.0.5 corrige este problema.","source":"nvd"}],"published":"2025-05-06T16:45:17.000Z","modified":"2026-06-17T09:26:58.900Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.0","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L","score":9.4,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.0","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L","score":9.4,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:3.0","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L","score":9.4,"rating":"CRITICAL"}],"cwes":["CWE-77","CWE-284"],"affected":[{"ranges":[{"version":">= 0.3.4, < 1.0.5","status":"affected"}],"vendor":"patrickhener","product":"goshs","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0.3.4","status":"affected","fixed":"1.0.5"}],"ecosystem":"Go","package":"github.com/patrickhener/goshs","purl":"pkg:golang/github.com/patrickhener/goshs","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.3.4","status":"affected","fixed":"1.0.5"}],"ecosystem":"Go","package":"github.com/patrickhener/goshs","purl":"pkg:golang/github.com/patrickhener/goshs","source":"go"}],"references":[{"url":"https://github.com/patrickhener/goshs/security/advisories/GHSA-rwj2-w85g-5cmm","tags":["advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/patrickhener/goshs/commit/160220974576afe5111485b8d12fd36058984cfa","tags":["fix","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-46816","tags":["advisory"],"sources":["ghsa","go"]},{"url":"https://github.com/patrickhener/goshs","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"total","date":"2025-05-06T19:18:18.182Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-46816","url":"https://www.cve.org/CVERecord?id=CVE-2025-46816","licence":"CVE Terms of Use","modified":"2025-05-06T19:23:18.087Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-rwj2-w85g-5cmm","url":"https://github.com/advisories/GHSA-rwj2-w85g-5cmm","licence":"CC-BY-4.0","modified":"2025-05-15T20:41:56.148Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2025-3672","url":"https://pkg.go.dev/vuln/GO-2025-3672","licence":"CC-BY-4.0","modified":"2026-03-03T04:56:34.298Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-46816","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-46816","licence":"Public domain","modified":"2026-06-17T09:26:58.900Z"}],"updatedAt":"2026-11-25T22:58:57.670Z","epss":{"score":0.00765,"percentile":0.56657,"date":"2026-12-01T12:00:22.000Z"}}