Summary
Glances Central Browser mode exposed raw server objects through the /api/4/serverslist endpoint, including URIs that could embed HTTP Basic credentials derived from the shared Glances authentication secret.
When the front Glances Browser/API instance runs without --password, this endpoint is unauthenticated, allowing any reachable network user to harvest reusable credentials for downstream Glances servers after they have been polled.
Affected context
The vulnerability occurs when Glances is deployed in Central Browser mode, where a front Glances instance aggregates metrics from multiple downstream Glances servers.
In affected versions, the /api/4/serverslist endpoint returns raw server objects from GlancesServersList.get_servers_list(), which may contain a uri field embedding HTTP Basic credentials derived from the shared Glances authentication secret.
Many internal or lab deployments start the front Glances Browser/API instance without the --password option, leaving /api/4/serverslist fully unauthenticated and accessible to any user who can reach the Browser API over the network.
Exploit preconditions
- Attack surface: HTTP API of the Glances Central Browser instance, specifically the
/api/4/serverslistendpoint. - Required access: Network-level access to the Glances Browser/API host and port; no application-level authentication is required if the instance is started without
--password. - Trigger point: Attacker issues a request to
/api/4/serverslistafter the Central Browser has polled one or more downstream servers and populated theirurifields. - Why exploitation is possible: The API directly exposes internal server objects that are mutated in-place during polling, including URIs that may embed reusable HTTP Basic credentials derived from the pbkdf2-based Glances secret, and this endpoint can be left completely unauthenticated.
Why this happens
At its core, this issue is a sensitive data exposure problem (CWE-200) combined with insufficient protection of credentials in transit and storage (CWE-522).
The Central Browser mode returns full server representation objects, including their uri attributes, without filtering or redacting embedded secrets.
Because these objects are reused and mutated in-place during background polling, they can accumulate authentication details that were originally meant only for server-to-server communication.
The design assumes that internal network deployments without --password are trusted, and thus the /api/4/serverslist endpoint is exposed without access control.
This pattern—reusing rich internal objects as API response payloads and omitting authentication around an endpoint that leaks those objects—creates an unintentional channel where credentials and other sensitive fields become observable to any network user.
Potential impact
- Attackers may obtain reusable HTTP Basic credentials for downstream Glances servers.
- Attackers could authenticate to protected downstream Glances instances and view or manipulate monitored system information.
- Compromised credentials may be reused elsewhere if operators repeat secrets across services or environments.
- An attacker with access to monitoring endpoints may gain auxiliary information useful for lateral movement, such as hostnames, IP ranges, and system metadata.
- Operational monitoring integrity can be undermined if attackers impersonate legitimate monitoring clients.
General mitigation guidance
Mitigation typically focuses on reducing the exposure of sensitive fields and enforcing stronger access control around introspection APIs.
Useful defensive patterns include:
- Designing API response schemas that only return the minimum necessary fields for clients, excluding or redacting URIs, credentials, and secrets from server list responses.
- Separating internal data models from external API representations so that in-memory objects used for polling are never serialized directly to clients.
- Applying authentication and, where appropriate, authorization to all administrative or discovery endpoints, even on internal networks.
- Avoiding embedding credentials directly in URIs; instead, use separate, protected configuration channels or token-based mechanisms for backend authentication.
- Rotating shared secrets and HTTP Basic credentials when exposure is suspected, and preferring per-service or per-instance credentials over shared secrets.
- Restricting network access to monitoring APIs via firewall rules, reverse proxies, or VPN access so that only intended operators can reach Central Browser endpoints.
How teams detect issues like this
Organizations can detect and manage similar issues by combining code analysis, configuration review, and runtime monitoring.
Potential strategies include:
- Static analysis or code review rules that flag:
- Direct serialization of internal objects to API responses.
- API handlers that return connection URIs, credentials, or tokens.
- Endpoints handling sensitive resources that lack explicit authentication or authorization checks.
- Architectural reviews focusing on "discovery" or "listing" APIs (e.g., server lists, configuration dumps) to ensure they do not expose secrets or internal URIs.
- Configuration audits that verify Central Browser or equivalent monitoring frontends are consistently deployed with authentication enabled, even on internal networks.
- API gateway or reverse proxy policies that require authentication for all non-public endpoints and log accesses to introspection or configuration-related paths.
- Periodic security testing (including automated tooling) to enumerate API endpoints, inspect responses for secrets, and flag leakage of URIs or credentials.

