Skip to main content

CVE-2025-46816 — Vulnerability in patrickhener/goshs — CVE Details

CRITICAL

goshs route not protected, allows command execution

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

What Should I Do?

Address in Next Maintenance Window

Low exploitation probability (1.14%). Schedule for your next planned update.

Does your project use an affected github.com/patrickhener/goshs version?

Paste your go.sum to check it for CVE-2025-46816 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.

Check my go.sum

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:

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 (570 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, scan your dependencies again to confirm the vulnerability is resolved.

Affected Packages (1)

Affects 1 ecosystem: Go (1).

PackageFixed In
github.com/patrickhener/goshs Go · Affected: 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. It has a 1.1% probability of exploitation within 30 days (EPSS score). 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

Maximum impact if exploited, often with little effort or access required.

EPSS Score (30-day exploit probability)
1.14%
EPSS percentile: 66.2

This is an above-median EPSS score — 66.2% of tracked vulnerabilities score at or below it, putting its exploitation likelihood in the upper half of the tracked corpus.

Also Known As

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

Related CVEs

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my go.sum