Files
vibe-kanban/packages
Anastasiia SolopandClaude Opus 5.5 7fbde10fc4 Require relay signatures by default (fixes GHSA-rrhv-24wq-6q5j) (#3510)
* Require relay signatures on every /api route by default

Relayed requests were only signature-checked inside one route group, so
the relay-auth and host-relay routes merged outside it accepted unsigned
relayed requests (GHSA-rrhv-24wq-6q5j): anyone reaching a host through
the relay could list and remove its paired devices.

Replace the per-group layers with one guard over /api. A pure
relay_route_policy() decides per route: the three pairing routes stay
unsigned, device management, the enrollment code and the /host proxy are
refused over relay, and everything else needs a valid signature and gets
a signed response. Local requests are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Refuse local-only routes to WebRTC peers too

Requests over a WebRTC data channel reached the local backend with the
relay header stripped, so the guard treated them as coming from this
machine and a paired device could still fetch an enrollment code, remove
paired devices or proxy on to other hosts. The peer now marks every
proxied HTTP and WebSocket request with x-vk-webrtc-peer, and the guard
refuses local-only routes for it. The data channel itself is the
authentication (only a paired device can open it), so these requests
still need no signature.

Also make /open-remote-editor/* and /relay-auth/client/* local-only:
both contact or pair other hosts with this host's keys, and the frontend
already never sends them to another host. Local-only routes now answer
404 instead of 403, because relay clients treat 401/403 as an expired
signing session and re-handshake.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 09:17:15 +01:00
..