CVE-2026-40885 goshs: Public collaborator feed leaks .goshs ACL credentials and enables unauthorized access

High 7.7 Published Updated

Unauthenticated attackers can capture leaked ACL credentials from websocket feeds to bypass authorization and modify files in protected directories.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2026-40885?

CVE-2026-40885 is a high-severity vulnerability in patrickhener goshs, published on 21 Apr 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

goshs is a SimpleHTTPServer written in Go. From 2.0.0-beta.4 to 2.0.0-beta.5, goshs leaks file-based ACL credentials through its public collaborator feed when the server is deployed without global basic auth. Requests to .goshs-protected folders are logged before authorization is enforced, and the collaborator websocket broadcasts raw request headers, including Authorization. An unauthenticated observer can capture a victim's folder-specific basic-auth header and replay it to read, upload, overwrite, and delete files inside the protected subtree. This vulnerability is fixed in 2.0.0-beta.6.

Weakness: CWE-200

Which versions are affected by CVE-2026-40885?

4 open source packages ship an affected version, including github.com/patrickhener/goshs/v2 and github.com/patrickhener/goshs. It affects 1 product.

PackageAffectedFixed in
github.com/patrickhener/goshs/v2 GoFrom 2.0.0-beta.42.0.0-beta.6
github.com/patrickhener/goshs/v2 GoFrom 2.0.0-beta.42.0.0-beta.6
github.com/patrickhener/goshs/v2 GoFrom 2.0.0-beta.42.0.0-beta.6
github.com/patrickhener/goshs GoAll versionsNone

Products include Goshs Goshs.

How do I fix CVE-2026-40885?

Upgrade github.com/patrickhener/goshs/v2 to 2.0.0-beta.6 or later.

Is CVE-2026-40885 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-40885 exists.

Sources

Also known as GHSA-7h3j-592v-jcrp, GO-2026-5221.

Is CVE-2026-40885 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free