{"schema_version":"1.7.3","id":"GHSA-rwj2-w85g-5cmm","published":"2025-05-06T16:45:17Z","modified":"2025-05-15T20:41:56.148303Z","aliases":["CVE-2025-46816","GO-2025-3672"],"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.","affected":[{"package":{"name":"github.com/patrickhener/goshs","ecosystem":"Go","purl":"pkg:golang/github.com/patrickhener/goshs"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0.3.4"},{"fixed":"1.0.5"}]}],"database_specific":{"last_known_affected_version_range":"<= 1.0.4","source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/05/GHSA-rwj2-w85g-5cmm/GHSA-rwj2-w85g-5cmm.json"}}],"references":[{"type":"WEB","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":"WEB","url":"https://github.com/patrickhener/goshs/commit/160220974576afe5111485b8d12fd36058984cfa"},{"type":"PACKAGE","url":"https://github.com/patrickhener/goshs"}],"database_specific":{"cwe_ids":["CWE-284","CWE-77"],"github_reviewed":true,"github_reviewed_at":"2025-05-06T16:45:17Z","nvd_published_at":"2025-05-06T19:16:00Z","severity":"CRITICAL"},"severity":[{"type":"CVSS_V3","score":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L"}]}