Loading...
Skip to main content

CVE-2025-46816 — Vulnerability in github.com/patrickhener/goshs —...

CRITICAL

goshs route not protected, allows command execution

Published May 6, 2025Updated May 15, 2025Source: osv

Summary

### 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: ```bash 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.

Advisory Timeline

  • First published May 6, 2025 (524 days ago).
  • Last revised May 15, 2025 — 9 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Go
Update github.com/patrickhener/goshs to 1.0.5 or later
go get github.com/patrickhener/goshs@v1.0.5

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (1)

Affects 1 ecosystem: go (1).

PackageEcosystemAffectedFixed In
github.com/patrickhener/goshs
go
All versions1.0.5

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 9.4 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
Low

CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L

Frequently Asked Questions

What is CVE-2025-46816?
goshs route not protected, allows command execution This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 9.4/10).
How do I check if my project is affected by CVE-2025-46816?
CVE-2025-46816 affects github.com/patrickhener/goshs. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2025-46816 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
9.4

Exploitation is straightforward and causes maximum impact. Patch immediately.

Also Known As

GHSA-rwj2-w85g-5cmm
GO-2025-3672

Related CVEs

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies