You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
security: Session API reads and stats /config have no Host check, so DNS rebinding can read prompts #1638
On a laptop install, a web page can read session content and the runtime config through DNS rebinding.
The session API (:47601) checks the Host and Origin headers only on the two DELETE routes (clear.go#L143-L153).
Every GET route has no check (server.go#L206-L217). This includes /v1/sessions/{id}, /v1/events and /v1/sessions/{id}/timeline. These routes return raw prompts, completions and tool results.
The stats server (:47602) serves /config with no check (statserver.go#L100). redact.JSON removes secrets by key name only, so a secret under an unexpected key name is returned.
pprof on the same stats port already refuses a non-loopback Host (pprof.go#L39).
The server sends no CORS headers, so a normal cross-origin read fails. DNS rebinding makes the page same-origin, so that protection does not apply.
Suggested fix
Apply the httpx.LoopbackHost check to every route on both servers when listener.bind_loopback_only is set. The clear guard and pprof use this check already. Cluster deployments are not changed.
Open question
Do API reads also need a token? The Host check closes the browser path. A token also stops other local processes, but agentop must then get the token.
Activity
Fix: Refuse a rebound Host or a browser Origin on every session API a…