GHSA-r297-p3v4-wp8m Glances's Browser API Exposes Reusable Downstream Credentials via `/api/4/serverslist`
SummaryIn Central Browser mode, the `/api/4/serverslist` endpoint returns raw server objects from `GlancesServersList.get_servers_list()`. Those objects are mutated in-place during background polling and can contain a `uri` field with embedded HTTP Basic credentials for downstream Glances servers, using the reusable pbkdf2-derived Glances authentication secret.If the front Glances Browser/API instance is started without `--password`, which is supported and common for internal network deployments, `/api/4/serverslist` is completely unauthenticated. Any network user who can reach the Browser API can retrieve reusable credentials for protected downstream Glances servers once they have been polled by the browser instance.DetailsThe Browser API route simply returns the raw servers list:The main API router is only protected when the front instance itself was started with `--password`. Otherwise there are no authentication dependencies at all:The Glances web server binds to `0.0.0.0` by default:During Central Browser polling, server entries are modified in-place and gain a `uri` field:For protected servers, `get_uri()` loads the saved password from the `[passwords]` section (or the `default` password), hashes it, and embeds it directly in the URI:Password lookup falls back to a global default:The sample configuration explicitly supports browser-wide default password reuse:The secret embedded in `uri` is not the cleartext password, but it is still a reusable Glances authentication credential. Client connections send that pbkdf2-derived hash over HTTP Basic authentication:The Browser WebUI also consumes that raw `uri` directly and redirects the user to it:So once `server.uri` contains credentials, those credentials are not just used internally; they are exposed to API consumers and frontend JavaScript.PoCStep 1: Verified local live proof that server objects contain credential-bearing URIsThe following command executes the real `glances/servers_list.py` update logic against a live local HTTP server that always returns `401`. This forces Glances to mark the downstream server as `PROTECTED` and then retry with the saved/default password. After the second refresh, the in-memory server list contains a `uri` field with embedded credentials.Verified output:This is the same raw object shape that `/api/4/serverslist` returns.Step 2: Remote reproduction on a live Browser instanceConfigure Glances Browser mode with a saved default password for downstream servers:Start the Browser/API instance without front-end authentication:Ensure at least one protected downstream server is polled and marked `PROTECTED`.From any machine that can reach the Glances Browser API, fetch the raw server list:Observe entries like:Impact**Unauthenticated credential disclosure:** When the front Browser API runs without `--password`, any reachable user can retrieve downstream Glances authentication secrets from `/api/4/serverslist`.**Credential replay:** The disclosed pbkdf2-derived hash is the effective Glances client secret and can be replayed against downstream Glances servers using the same password.**Fleet-wide blast radius:** A single Browser instance can hold passwords for many downstream servers via host-specific entries or `[passwords] default`, so one exposed API can disclose credentials for an entire monitored fleet.**Chains with the earlier CORS issue:** Even when the front instance uses `--password`, the permissive default CORS behavior can let a malicious website read `/api/4/serverslist` from an authenticated browser session and steal the same downstream credentials cross-origin.Recommended FixDo not expose credential-bearing fields in API responses. At minimum, strip `uri`, `password`, and any derived credential material from `/api/4/serverslist` responses and make the frontend derive navigation targets without embedded auth.And in the Browser WebUI, construct navigation URLs from non-secret fields (`ip`, `name`, `port`, `protocol`) instead of trusting a backend-supplied `server.uri`.
CVSS v3.1 score: 9.1