GHSA-9v4j-7g44-qcqw
### Summary When auto-refresh is enabled, Algernon spins up an SSE handler that streams a `data:` line for every filesystem event under the watched directory. The handler performs **no authentication** of any kind — no shared token, no cookie check against the `permissions2` userstate, no IP allow-list, no path-prefix permission. Any client that can complete a TCP connection to the listener address receives the stream. This advisory covers the authentication gap in isolation. The cross-origin browser-reach (advisory #2b) and the network-reach (advisory #2c) amplify the impact, but each is independently fixable; this finding addresses the case where a same-origin or LAN-local client connects directly to the SSE port and reads the stream without proving anything about its identity. ### Details #### Root cause — the SSE handler does not consult `permissions2` or any other auth ```go // vendor/github.com/xyproto/recwatch/eventserver.go:100-144 (1.17.6) func GenFileChangeEvents(events TimeEventMap, mut *sync.Mutex, maxAge time.Duration, allowed string) http.HandlerFunc { return func(w http.ResponseWriter, _ *http.Request) { w.Header().Set("Content-Type", "text/event-stream;charset=utf-8") w.Header().Set("Cache-Control", "no-cache") w.Header().Set("Connection", "keep-alive") w.Header().Set("Access-Control-Allow-Origin", allowed) // ... loop emits one SSE record per filename touched ... } } ``` Note the handler signature: `func(w http.ResponseWriter, _ *http.Request)`. The request is discarded — no `Cookie`, `Authorization`, query-string, or remote-IP check is performed before the stream begins. In 1.17.6 the listener was placed on its own `http.ServeMux` ([recwatch/eventserver.go:200-215](../vendor/github.com/xyproto/recwatch/eventserver.go)), wholly outside the `perm.Rejected` middleware chain that gates Algernon's main HTTP listener. Even an operator who had configured admin/user path prefixes via `perm.AddAdminPat
Properties
- ghsa_id
- GHSA-9v4j-7g44-qcqw
- severity
- medium
- summary
- Algernon: Auto-refresh SSE event server binds to all interfaces with Access-Control-Allow-Origin: * and no authentication
- cvss_score
- 5.3
- cve_id
- GHSA-9v4j-7g44-qcqw
- cvss_vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
- is_ghsa_only
- true
- ghsa_published
- 2026-05-19T14:36:34Z
- source_url
- https://github.com/advisories/GHSA-9v4j-7g44-qcqw
- ghsa_updated
- 2026-05-19T14:36:35Z
Related Entities (7)
VULNERABLE_TO (1)
AFFECTS (1)
HAS_WEAKNESS (4)
REPORTED_BY (1)
Explore deeper with Ninja Signal's threat intelligence graph