# GHSA-xv8g-fj9h-6gmv: Linkdave Missing Authentication on REST and WebSocket endpoints

> Unauthenticated attackers can control audio playback and access server statistics via exposed REST and WebSocket endpoints.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 10 Mar 2026
- **Also known as:** GO-2026-4661

## What is GHSA-xv8g-fj9h-6gmv?

GHSA-xv8g-fj9h-6gmv is a missing authorization vulnerability in github.com/shi-gg/linkdave, published on 10 Mar 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

The `linkdave` server does not enforce authentication on its REST and WebSocket routes in versions prior to `0.1.5`.

### Impact

An attacker with network access to the server port can:
- Connect to the WebSocket endpoint (`/ws`) and receive a valid `session_id` in the `OpReady` response.
- Use that session to invoke all REST player controls on any guild corresponding to their session id[1].
- Enumerate server statistics and runtime information via the unauthenticated `/stats` endpoint (still public after the fix).

[1] If on [`>=0.1.0`](https://github.com/shi-gg/linkdave/releases/tag/v0.1.0), attackers are restricted to creating, controlling and deleting players created within their own session ID.

### Vulnerable Routes

The following routes were entirely unauthenticated in `>= 0.0.1, < 0.1.5`:

| Method | Path | Description |
|--------|------|-------------|
| `POST` | `/sessions/{session_id}/players/{guild_id}/play` | Start audio playback |
| `POST` | `/sessions/{session_id}/players/{guild_id}/pause` | Pause playback |
| `POST` | `/sessions/{session_id}/players/{guild_id}/resume` | Resume playback |
| `POST` | `/sessions/{session_id}/players/{guild_id}/stop` | Stop playback |
| `POST` | `/sessions/{session_id}/players/{guild_id}/seek` | Seek to position |
| `PATCH` | `/sessions/{session_id}/players/{guild_id}/volume` | Set volume |
| `DELETE` | `/sessions/{session_id}/players/{guild_id}` | Disconnect from voice channel |
| `GET` | `/ws` | WebSocket event stream |

### Patches

Update to [`0.1.5`](https://github.com/shi-gg/linkdave/commit/0f9a00d9d549b16278db81fce6dfec350c2abc01).

```diff
- image: ghcr.io/shi-gg/linkdave:0.1.4
+ image: ghcr.io/shi-gg/linkdave:latest
```
or
```sh
docker pull ghcr.io/shi-gg/linkdave:latest
```

After upgrading, set the `LINKDAVE_PASSWORD` environment variable to a strong secret value. If this variable is left unset, the server will still accept all connections without authentication even on `>= 0.1.5`.

**Server configuration (e.g. `compose.yml`):**
```sh
environment:
    LINKDAVE_PASSWORD: ${LINKDAVE_PASSWORD}
```
```sh
echo "LINKDAVE_PASSWORD=$(openssl rand -hex 16)" >> .env
```

To restart the stack, run
```sh
docker compose up -d
```

**TypeScript client (`0.1.5+`):**

The client automatically handles authentication. Pass the password when constructing the client:
```ts
const linkdave = new LinkDaveClient({
    nodes: [
        {
            name: "main",
            url: process.env.LINKDAVE_URI,
            password: process.env.LINKDAVE_PASSWORD
        }
    ]
});
```

### Workarounds

If upgrading is not immediately possible, restrict network access to the server's port using a firewall so it is only accessible from trusted internal IP addresses.

## Which versions are affected by GHSA-xv8g-fj9h-6gmv?

3 open source packages ship an affected version, including github.com/shi-gg/linkdave.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/shi-gg/linkdave` | Go | All versions | 0.1.5 |
| `github.com/shi-gg/linkdave` | Go | All versions | 0.1.5 |
| `github.com/shi-gg/linkdave` | Go | All versions | 0.1.5 |

## How do I fix GHSA-xv8g-fj9h-6gmv?

Upgrade github.com/shi-gg/linkdave to 0.1.5 or later.

## Is GHSA-xv8g-fj9h-6gmv being exploited?

There is no known exploitation of GHSA-xv8g-fj9h-6gmv in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-xv8g-fj9h-6gmv and fix it if it is affected.

What it is: GHSA-xv8g-fj9h-6gmv is a missing authorization vulnerability in github.com/shi-gg/linkdave, published on 10 Mar 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of GHSA-xv8g-fj9h-6gmv in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/shi-gg/linkdave (Go): affected all versions; fixed in 0.1.5
- github.com/shi-gg/linkdave (Go): affected all versions; fixed in 0.1.5
- github.com/shi-gg/linkdave (Go): affected all versions; fixed in 0.1.5

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/GHSA-xv8g-fj9h-6gmv/ (Markdown: https://insights.sbomify.com/GHSA-xv8g-fj9h-6gmv/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-xv8g-fj9h-6gmv

---
From sbomify Insights: https://insights.sbomify.com/GHSA-xv8g-fj9h-6gmv/
Summaries are generated and may contain mistakes; the official description above is the record.
