English · Español
Website · Documentation · Home · Changelog
| Version | Supported |
|---|---|
| Latest | ✓ |
| < Latest | ✗ |
Only the latest commit on main receives security patches.
Do not open a public issue. Instead, email:
We aim to respond within 72 hours and publish a fix within 7 days of confirmation.
- A clear description of the vulnerability
- Steps to reproduce (proof-of-concept code helps)
- Affected components (RAG API, PWA frontend, shell scripts, CLI, installer)
- Whether you believe it's exploitable remotely or only locally
- Any suggested mitigations
- You report privately via email.
- We acknowledge within 72 hours and begin triage.
- We develop and test a fix.
- We publish a GitHub Security Advisory (GHSA) and patch release.
- You receive credit in the advisory (unless you prefer anonymity).
TrinaxAI is local-first: inference and persisted application data use the configured host by default. Installation/model downloads, explicit web research, external assets, and operator-configured remote endpoints are network activity. The primary attack surface is:
| Component | Risk | Notes |
|---|---|---|
RAG API (app/) |
Medium | Managed launch is loopback-only. The local gateway signs the original peer with a short-lived HMAC assertion; ordinary forwarding headers are ignored. Private state, sources, memory, attachments, agent and administration require authorization. |
PWA gateway (chat-pwa/vite.config.ts) |
Medium | LAN-facing HTTPS boundary. It validates paired-device/admin credentials, strips client-supplied identity headers, signs the peer for FastAPI, applies security headers, and exposes only an allowlisted Ollama facade. Vite remains a project gateway, not a generic reverse proxy. |
Agent (trinaxai_agent/) |
High | File tools resolve symlinks inside registered workspace roots. Linux shell commands use networkless bubblewrap (installed by install.sh, checked by trinaxai doctor) with the workspace's .git/config and .git/hooks mounted read-only (commands run in the sandbox cannot plant aliases or hooks that run later outside it). The separate git tool runs git on the host with your own git setup, so git commit, git push and git pull work when you ask: reading commands run freely, changing commands ask first, and anything that contacts a remote asks every time and is never offered "don't ask again" (only --yolo skips it). The tool accepts a fixed list of subcommands, refuses global options and options that run programs or read outside the repository, only runs when the workspace is the repository root, keeps hooks off unless TRINAXAI_AGENT_GIT_HOOKS=1, and refuses remote commands from paired devices; on macOS and Windows no OS sandbox exists, so command execution stays disabled unless TRINAXAI_AGENT_ALLOW_UNSANDBOXED_COMMANDS=1 accepts full user-level host access. File tools remain confined to registered workspaces on every platform. Dangerous tools require approval; HTTP auto-approval is disabled and cannot be enabled remotely. |
CLI (trinaxai_cli/) |
Limited | Local terminal tool with verified TLS by default; private certificates require --ca-file or TRINAXAI_CA_FILE. --yolo and unsandboxed command execution are explicit high-risk opt-ins. |
| Lifecycle/backups | Medium | Privileged lifecycle calls use an exact, root-owned wrapper rather than repository-editable scripts. Backups use private modes, validate archive entry types/paths, restore through staging, and roll back failed replacement. Backups contain sensitive data and should still be encrypted at rest. |
| Ollama | High if exposed | Ollama has no built-in authentication. Managed launch binds it to 127.0.0.1; never expose port 11434 or a generic Ollama proxy. |
| Uploads/web fetch | Medium | Imports use managed roots, sanitized paths, quotas, and protected endpoints. Web page reads are bounded, resolve/connect to validated public IPs, reject private/link-local destinations and revalidate redirects. Parsers still process untrusted formats, so keep limits conservative. |
- Vulnerabilities in third-party dependencies (Ollama, LlamaIndex, Node.js modules) — report those upstream
- Social engineering attacks against users
- Physical access to the host machine
- Denial of service via resource exhaustion (inherent to running LLMs locally)
TrinaxAI's threat model assumes:
- Trusted local machine — the host is not compromised
- Untrusted LAN by default — possession of the same WiFi is not identity; protected remote requests require a scoped paired-device token or the administrator credential
- Untrusted internet — TrinaxAI should never be exposed directly to the internet without a VPN or authenticated reverse proxy
- LAN attacker (same WiFi, no credential): The gateway preserves the signed
original IP, so a proxied client cannot inherit loopback privilege. The
rate-limited new-device bootstrap can issue only
chat/web; app state, attachments, sources, memory, index/system routes and the agent still return403without their scopes. - Stolen device token: A device token is a bearer capability limited to its
recorded scopes. A new PWA claim keeps it only in an
HttpOnly; SameSite=Strictcookie scoped to/api; the browser never receives a new bearer in JSON or persists it in browser storage. FastAPI stores only a keyed hash, and host/admin operators can revoke it immediately. A legacy bearer stored in the browser is read only for the explicit/v1/pairing/memigration and cleared after a successful response. Legacy CLI bearers remain header-only and are never copied into a response cookie. Pair only devices you control and revoke a lost device withtrinaxai pair revoke; the CLI remains header-based. - Forged proxy identity: Client-supplied TrinaxAI/forwarding headers are stripped
by the gateway. FastAPI accepts a fresh, single-use HMAC signature only from
loopback or an explicitly configured private runtime peer; network membership
alone grants no privilege without the secret in
storage/.proxy_secret. - Prompt injection in indexed/web content: Retrieved material is delimited and labelled untrusted. It cannot authorize a tool. Keep dangerous-action approval on; HTTP yolo is off and restricted to real loopback even when explicitly enabled.
- Remote attacker (internet): Should be impossible if ports are not forwarded. Use a VPN for remote access.
- Malicious tarball (
backup.sh restore): Only the expected.env,storage/andlocal_sources/trees are accepted; absolute/traversal paths, links and device entries are rejected before staged replacement.
- Keep FastAPI and Ollama on loopback. Leave
TRINAXAI_UNSAFE_BIND_BACKEND=0; publish only the authenticated PWA gateway. - Pair devices with least privilege.
trinaxai pair startgrantschat,read_privateby default. Addweb, or the elevatedindex,agentandmodifypermissions, only for a device you trust with your files:indexlets it index/watch folders and delete sources,agentlets it run the Agent (still confirming every dangerous action), andmodifylets it edit memory and web-search settings. Change a device later withtrinaxai pair set ID --scopes ..., reviewtrinaxai pair list, and revoke devices that are lost or no longer used. - Administer only from
https://localhost:3334. Power and lifecycle actions, model and device management, factory reset, and the Agent's YOLO (auto-approve) mode require verified loopback and can never be granted to a device. Elevated permissions are granted only by the localhost operator; a device cannot raise its own, and an admin token sent over the network does not unlock them. - Keep credential secrets private. Never share
storage/.proxy_secretorstorage/.device_secret; preserve mode0600on those files and onstorage/device_pairing.json. - Use a firewall to restrict the PWA port to intended devices and block direct ports 3333/11434.
- Use a VPN (Tailscale, WireGuard) for remote access — never forward ports directly to the internet.
- Keep dependencies reproducible and audited — install
requirements.lock, runpip-audit --require-hashes -r requirements.lockandnpm audit. There are no advisory exceptions: CI fails on any known vulnerability. - Keep shell isolation fail-closed. Install bubblewrap on Linux; do not enable
TRINAXAI_AGENT_ALLOW_UNSANDBOXED_COMMANDSon a remotely reachable service. - Encrypt backups when they leave the host; the archive includes
.env, chats, attachments, sources and indexes even though its filesystem mode is private. - Audit your install with
trinaxai doctor --strict --jsonandpython3 scripts/public_readiness.py.
- CI runs tests/build/typecheck/lint, hashed-lock
pip-audit, Bandit,npm audit, gitleaks, CodeQL and public-readiness checks. It produces a CycloneDX Python SBOM. - Dependabot monitors Python and npm dependencies weekly
- No secrets, tokens, or credentials are committed (enforced by
.gitignore) - Tagged releases build a deterministic archive, SHA-256 sums and GitHub/Sigstore provenance. The scheduled updater only checks availability; installation changes remain a reviewed manual operation.
We thank all security researchers who responsibly disclose vulnerabilities. Contributors will be listed here (with permission).
