Skip to content

Security: ThatRetiredDude/TokenStation5

SECURITY.md

Security Policy

TokenStation5 runs locally on your own hardware, but it exposes an HTTP API, embedded web pages, multi-user access, a built-in Tailscale client, a terminal sandbox, and a small privileged helper on Linux. Responsible reports that help keep those boundaries solid are welcome.

Supported versions

Security fixes are released on the latest version of each edition only. Older releases are not backported—please update to the newest build first.

Edition Branch / Tag Supported
Linux edition (ts5, ts5-tui, packages) linux-package (linux-v1.4.x / latest) ✅ Yes
PS5 title (PPSA99555) main (01.004.x / latest) ✅ Yes
Engine built from source Latest commit on main / linux-package ✅ Yes
Earlier Linux or PS5 releases < 1.4.0 / < 01.004.001 ❌ No

Reporting a vulnerability

Please do not open a public GitHub issue, discussion, or pull request for a suspected security vulnerability.

Instead, report it privately using GitHub's built-in vulnerability reporting:

What to include

Enough detail to reproduce the issue makes fixing it much faster:

  • Edition and version: Linux package version or PS5 title version (and Linux distro or PS5 firmware, if relevant).
  • Affected area: e.g. API keys / users, terminal sandbox, unattended tasks, hw sudoers helper, built-in Tailscale / HTTPS / SSH forwarding, web UI / browser terminal, GGUF loader, or PS5 title.
  • Steps to reproduce: commands, requests, or a minimal proof of concept (please scrub any real API keys, Tailscale keys, or tokens).
  • Impact: what an attacker can access, bypass, or escalate to.

What to expect

TokenStation5 is an independent, solo-maintained project, so there is no 24/7 security team or paid bug bounty program, but valid reports are taken seriously:

  • Acknowledgement: within 5 days (usually sooner).
  • Triage & updates: once confirmed, I will share an estimate or status as a fix is built and tested.
  • Coordinated disclosure: please keep the details private until a patched release is published (or up to 90 days from the initial report if we haven't agreed on another timeline).
  • Credit: with your permission, you will be credited in the GitHub Security Advisory and release notes (or kept anonymous if you prefer).

Scope

In scope

Issues in TokenStation5's own code and packaging, especially around its security boundaries:

  • Authentication & multi-user isolation: bypassing API keys (including mandatory key checks over Tailscale, /ts5/control, /ts5/terminal, or when users exist), elevating a non-owner user to Owner or terminal/tool access, cross-user chat or prompt-cache leaks, or bypassing per-user limits (model allowlists, pause, expiration, daily token caps).
  • Terminal sandbox & unattended tasks (Linux): escaping the bwrap sandbox or sandboxed Debian box into the user's home directory or host filesystem when sandboxing is active, leaking host environment variables or secrets into sandboxed commands, or bypassing tool restrictions (off/ask or unattended-task blocks).
  • Privileged hardware helper (Linux): privilege escalation to root, command injection, or path traversal through /usr/lib/tokenstation/hw and its tokenstation group sudoers rule.
  • Built-in Tailscale, HTTPS & SSH forwarding: ACL or auth bypasses in TokenStation5's Tailscale client, unintended exposure of local services (such as SSH forwarding when disabled), TLS/certificate validation flaws in ts5, or mishandling of stored secrets (tailscale.tsv, tailscale-https.key, Tailscale access tokens, API keys).
  • Web UI, phone chat page & browser terminal: XSS, CSRF, session/key leakage, or unauthorized control actions.
  • Engine, parsers & updater: memory corruption, path traversal, or arbitrary code execution via crafted GGUF files, HTTP/JSON requests, model downloads, or /update.
  • Vendored third-party libraries: known exploitable vulnerabilities in code vendored or statically bundled into TokenStation5 releases (such as Mbed TLS, lwIP, wireguard-lwip, whisper.cpp, kokoro.cpp, xterm.js) where TokenStation5 is actually affected.

Out of scope

  • Exposing port 8081 to the public internet, or running with Require a key turned off on an untrusted LAN. Port 8081 is plain HTTP by design; use Tailscale (and HTTPS on Linux) for remote access.
  • Jailbroken PS5 platform risks: PS5 firmware/jailbreaks, unauthenticated console services (ftpsrv, elfldr, ShadowMountPlus), and LAN access to files in the title folder (including tailscale.tsv) over the jailbreak's FTP server. Keep a jailbroken console on a network you trust.
  • Physical or local shell access: anyone with physical access to the PS5 or a shell on the Linux machine counts as the Owner.
  • Unsandboxed Linux setups: running terminal commands when bwrap is unavailable or blocked by AppArmor and the sandbox is shown as off in Settings.
  • LLM behavior and prompt injection: hallucinations, jailbreaks, or unwanted model text—unless they exploit a bug in TokenStation5 itself (such as escaping the sandbox, bypassing tool/unattended-task enforcement, or triggering XSS in the web UI).
  • Upstream services and system components: vulnerabilities in Tailscale's cloud service, Hugging Face, Tavily, Chromium, Mesa/Vulkan drivers, or PS5_Vulkan / PS5_PayloadSDK (please report those upstream).
  • Low-impact scanner noise without a realistic exploit path (e.g. missing hardening headers on local HTTP pages without a demonstrated attack, or DoS by an authenticated user sending large prompts).

Hardening your setup

For day-to-day setup advice—API keys, Tailscale + HTTPS, SSH restrictions, and multi-user isolation—see:

There aren't any published security advisories