Vulnerability · Published May 6, 2025 · Assigned by GitHub_M

CVE-2025-46816goshs route not protected, allows command execution

Critical 9.4

In plain English

A critical-severity improper access control in goshs from patrickhener. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.8% (higher than 55% of all known vulnerabilities). Ready-made attack tooling exists: public proof-of-concept code. Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.0)9.4Critical
Exploit odds (30 days)0.8%top 44.9% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack tooling1Public PoC

Official description

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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Gogithub.com/patrickhener/goshs1.0.5GHSA-rwj2-w85g-5cmm
Gogithub.com/patrickhener/goshs1.0.5GO-2025-3672

Affected products (as reported)

VendorProductVersions
patrickhener goshs >= 0.3.4, < 1.0.5

Weakness: CWE-284, CWE-77 · Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L

References