CVE-2026-40189 Details
Description
goshs is a SimpleHTTPServer written in Go. Prior to 2.0.0-beta.4, goshs enforces the documented per-folder .goshs ACL/basic-auth mechanism for directory listings and file reads, but it does not enforce the same authorization checks for state-changing routes. An unauthenticated attacker can upload files with PUT, upload files with multipart POST /upload, create directories with ?mkdir, and delete files with ?delete inside a .goshs-protected directory. By deleting the .goshs file itself, the attacker can remove the folder's auth policy and then access previously protected content without credentials. This results in a critical authorization bypass affecting confidentiality, integrity, and availability. This vulnerability is fixed in 2.0.0-beta.4.
A critical authorization bypass vulnerability has been identified in goshs, a SimpleHTTPServer written in Go. This issue affects versions through 2.0.0-beta.3. The vulnerability arises because goshs enforces its per-folder .goshs ACL/basic-auth mechanism for directory listings and file reads, but not for state-changing operations such as file uploads, directory creation, and file deletions. As a result, an unauthenticated attacker can exploit this oversight to manipulate files and directories within .goshs-protected areas. The attacker can upload files via PUT or multipart POST requests, create directories using the ?mkdir parameter, and delete files, including the .goshs file itself, thereby removing the folder's authentication policy and accessing previously protected content without credentials. This vulnerability undermines the confidentiality, integrity, and availability of the affected system.
Update to goshs version 2.0.0-beta.4 or later, where this vulnerability has been fixed. In the updated version, .goshs authorization checks are enforced for all state-changing operations, and the .goshs file is protected in mutation handlers.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Apr 13, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/patrickhener/goshs/security/advisories/GHSA-wvhv-qcqf-f3cx | CISA-ADP | ExploitMitigationVendor Advisory |
| https://github.com/patrickhener/goshs/commit/f212c4f4a126556bab008f79758e21a839ef2c0f | [email protected] | Patch |
| https://github.com/patrickhener/goshs/releases/tag/v2.0.0-beta.4 | [email protected] | ProductRelease Notes |
| https://github.com/patrickhener/goshs/security/advisories/GHSA-wvhv-qcqf-f3cx | [email protected] | ExploitMitigationVendor Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-862 | Missing Authorization | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| goshs goshs | < 2.0.0 2.0.0 beta1 2.0.0 beta2 2.0.0 beta3 |
CPE
Remediation
| |
Change History
5 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Apr 14, 2026 | Initial Analysis | [email protected] |
| Apr 13, 2026 | CVE Modified | CISA-ADP |
| Apr 10, 2026 | New CVE Received | [email protected] |