CVE-2025-46816: Github.com/patrickhener/goshs Goshs Route Not Protected, Allows Vulnerability
CRITICALCVE-2025-46816 is a CRITICAL (CVSS 9.4) goshs route not protected, allows vulnerability (CWE-284: Improper Access Control) affecting Github.com/patrickhener/goshs libraries in the Go ecosystem. The issue involves goshs route not protected, allows command execution. Remediation is available by upgrading affected packages to version 1.0.5.
CVE-2025-46816 at a Glance
Security Impact
CVSS: 9.4
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L).
How to Fix CVE-2025-46816
To remediate this vulnerability, upgrade all affected Github.com/patrickhener/goshs dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/patrickhener/goshs to 1.0.5
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/patrickhener/goshs
How to Check if You Are Affected
To determine whether your application is affected by CVE-2025-46816, inspect your project dependencies for Github.com/patrickhener/goshs:
inspect dependencies for github.com/patrickhener/goshs
Analyze the terminal output to locate any version of Github.com/patrickhener/goshs in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.0.5), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-284: Improper Access Control, where the product does not restrict or incorrectly restricts access to a resource from an unauthorized actor. In Github.com/patrickhener/goshs, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-46816 Affected Github.com/patrickhener/goshs Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/patrickhener/goshs
|
Go |
≥ 0.3.4
< 1.0.5
|
1.0.5
|
References
Frequently Asked Questions
What is CVE-2025-46816?
Which Github.com/patrickhener/goshs versions are affected?
What version fixes CVE-2025-46816?
Is github.com/patrickhener/goshs affected?
What is the CVSS score of CVE-2025-46816?
What CWE is associated with CVE-2025-46816?
How can I check Go dependencies for CVE-2025-46816?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-rwj2-w85g-5cmm",
"modified" : "2025-05-06T21:44:02Z",
"published" : "2025-05-06T16:45:17Z",
"aliases" : [ "CVE-2025-46816" ],
"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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/patrickhener/goshs"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.3.4"
}, {
"fixed" : "1.0.5"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 1.0.4"
}
} ],
"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" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2025-05-06T16:45:17Z",
"nvd_published_at" : "2025-05-06T19:16:00Z"
}
}