# CVE-2026-40189: patrickhener goshs authorization bypass in state-changing routes

Source: https://junglewise.ai/threats/cve-2026-40189-patrickhener-goshs-authorization-bypass-in-state-changing-routes  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-04-10. Updated: 2026-05-11  
License: CC BY 4.0 with a link back

CVE-2026-40189 · Severity: critical · CVSS 9.8 · Published 2026-04-10

goshs, a tool for serving files over HTTP, contains a security flaw in its folder-level protection system. While it correctly asks for a password to view files, it fails to check for that password when an attacker tries to upload, create, or delete files. This allows an unauthenticated person to delete the security configuration file itself, effectively unlocking the folder and gaining full access to private data.

Technologies: [github.com/patrickhener/goshs (Go)](https://junglewise.ai/threats/technologies/github-com-patrickhener-goshs). Vendors: [Go](https://junglewise.ai/threats/vendors/go).

## Quick answers

**Is CVE-2026-40189 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-40189 being exploited in the wild.

**How severe is CVE-2026-40189?** Critical severity, with a CVSS score of 9.8, published 10 April 2026.

**Which products and versions are affected?** github.com/patrickhener/goshs (Go) <= 1.1.4, SEMVER:introduced=0, SEMVER:introduced=0,last_affected=1.1.4.

**Is there a fix for CVE-2026-40189?** A patch was published on 2026-04-10: v2.0.0-beta.4 released Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-40189 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-40189?** Check whether you run github.com/patrickhener/goshs (Go) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

A missing authorization vulnerability exists in goshs where state-changing HTTP handlers (upload, put, handleMkdir, and deleteFile) do not invoke the findSpecialFile() or custom auth logic used by read/list handlers. An unauthenticated remote attacker can use PUT or multipart POST requests to write files, or use the ?mkdir and ?delete query parameters to modify the filesystem. By deleting the .goshs ACL configuration file via the unauthenticated ?delete route, an attacker can permanently remove the authorization barrier for a directory, subsequently gaining access to previously protected files. The issue is present in versions up to 1.1.4 and v2.0.0-beta.3; it is addressed in v2.0.0-beta.4.

## Affected products

- patrickhener goshs <= 1.1.4, v2.0.0-beta.3

## Identifiers

- CVE-2026-40189
- GHSA-wvhv-qcqf-f3cx
- GO-2026-5728

## Timeline

- 2026-04-09: disclosed
- 2026-04-10: advisory: GitHub Advisory published
- 2026-04-10: patched: v2.0.0-beta.4 released

## References

- [https://api.github.com/users/R1ZZG0D](https://api.github.com/users/R1ZZG0D)
- [https://github.com/R1ZZG0D](https://github.com/R1ZZG0D)
- [https://api.github.com/users/R1ZZG0D/gists%7B/gist_id%7D](https://api.github.com/users/R1ZZG0D/gists%7B/gist_id%7D)
- [https://api.github.com/users/R1ZZG0D/repos](https://api.github.com/users/R1ZZG0D/repos)
- [https://avatars.githubusercontent.com/u/72493187?v=4](https://avatars.githubusercontent.com/u/72493187?v=4)
- [https://api.github.com/users/R1ZZG0D/events%7B/privacy%7D](https://api.github.com/users/R1ZZG0D/events%7B/privacy%7D)

## Related threats

- [goshs-labs goshs ACL bypass via trailing slash in sendFile handler](https://junglewise.ai/threats/cve-2026-66064-goshs-labs-goshs-acl-bypass-via-trailing-slash-in-sendfile)
- [goshs path traversal in multipart upload handler](https://junglewise.ai/threats/cve-2026-66063-goshs-path-traversal-in-multipart-upload-handler)
- [goshs WebDAV deletion bypass via MOVE and COPY methods](https://junglewise.ai/threats/cve-2026-64863-goshs-webdav-deletion-bypass-via-move-and-copy-methods)
- [goshs-labs goshs authorization bypass in bulkDownload handler](https://junglewise.ai/threats/cve-2026-54719-goshs-labs-goshs-authorization-bypass-in-bulkdownload-handler)
- [GO-2026-5232 - Unauthenticated Open Redirect, Arbitrary HTTP Response Header Injection, Missing CSRF, and…](https://junglewise.ai/threats/go-2026-5232-unauthenticated-open-redirect-arbitrary-http-response-d731d0c3)
