# CVE-2026-40189: goshs has a file-based ACL authorization bypass in goshs state-changing routes

- Severity: Critical 9.3 (CVSS:4.0, scored by GitHub_M) `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.68%, higher than 53% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-04-10T19:44:54.672Z
- Modified: 2026-10-26T22:10:00.163Z
- Also known as: GHSA-wvhv-qcqf-f3cx, GO-2026-5728
- Weaknesses: CWE-862
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact total
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- patrickhener goshs: < 2.0.0-beta.4
- github.com/patrickhener/goshs (Go): up to 1.1.4; all versions
- goshs goshs: before 2.0.0; 2.0.0

## Every score

- GitHub_M: CVSS:4.0 9.3 Critical `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`
- GitHub: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- GitHub: CVSS:4.0 Critical `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`
- NVD: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://github.com/patrickhener/goshs/security/advisories/GHSA-wvhv-qcqf-f3cx> (exploit, advisory, mitigation, vendor-advisory, web)
- <https://github.com/patrickhener/goshs/commit/f212c4f4a126556bab008f79758e21a839ef2c0f> (fix, patch, web)
- <https://github.com/patrickhener/goshs/releases/tag/v2.0.0-beta.4> (product, release-notes, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-40189> (advisory)
- <https://github.com/patrickhener/goshs> (package)

## Sources

- CVE List: [CVE-2026-40189](https://www.cve.org/CVERecord?id=CVE-2026-40189), CVE Terms of Use, modified 2026-04-13
- GitHub Advisory Database: [GHSA-wvhv-qcqf-f3cx](https://github.com/advisories/GHSA-wvhv-qcqf-f3cx), CC-BY-4.0, modified 2026-06-25
- Go Vulnerability Database: [GO-2026-5728](https://pkg.go.dev/vuln/GO-2026-5728), CC-BY-4.0, modified 2026-06-25
- NVD: [CVE-2026-40189](https://nvd.nist.gov/vuln/detail/CVE-2026-40189), Public domain, modified 2026-10-26

---

Page: https://cve.day/CVE-2026-40189 · Whole record: https://cve.day/CVE-2026-40189.json · Rebuilt by cve.day 2026-11-25T22:59:18.547Z
