CVE-2025-46816 — Vulnerability in patrickhener/goshs — CVE Details
goshs route not protected, allows command execution
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.
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 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).
| Package | Fixed In |
|---|---|
| github.com/patrickhener/goshs Go · Affected: All versions | 1.0.5 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-284
- CWE-77
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 9.4 score means for each attack dimension.
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L
References
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
Maximum impact if exploited, often with little effort or access required.
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
Related CVEs
- CVE-2026-35471CRITICAL
goshs: Improper Limitation of a Pathname to a Restricted Directory (Path Traversal)
- CVE-2026-40884CRITICAL
goshs has an empty-username SFTP password authentication bypass
- CVE-2026-35392CRITICAL
goshs: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in goshs PUT Upload
- CVE-2026-64863CRITICAL
goshs --no-delete WebDAV MOVE bypass allows file deletion/overwrite
- CVE-2026-35393CRITICAL
goshs: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in goshs POST multipart upload
- CVE-2026-40189CRITICAL
goshs has a file-based ACL authorization bypass in goshs state-changing routes
- CVE-2026-40876HIGH
SFTP root escape via prefix-based path validation in goshs
- CVE-2026-40885HIGH
goshs's public collaborator feed leaks .goshs ACL credentials and enables unauthorized access