Summary
Glances' built-in web server, when started with glances -w, previously ran without authentication by default and exposed a REST API containing sensitive system information.
Any network client able to reach the Glances web interface could retrieve process details, including command-line arguments that may contain passwords, API keys, or tokens, leading to unintended disclosure of secrets and system metadata.
Affected context
This vulnerability affects environments where Glances is launched with the web server option (glances -w), particularly when:
- The Glances web interface is bound to a network-accessible interface (e.g., 0.0.0.0 or a routable IP).
- No reverse proxy, firewall, or additional access control restricts inbound connections.
- Applications or scripts embed secrets in process command-line arguments (e.g., database passwords, API tokens).
Under these conditions, the REST API can reveal detailed system and process information to unauthenticated users on the accessible network segment.
Exploit preconditions
- Attack surface: Glances HTTP web interface / REST API exposed by
glances -w. - Required access: Network-level access to the host and port where Glances listens (typically HTTP over a configurable port).
- Authentication: None required in vulnerable configurations; the server accepts requests from any client that can connect.
- Trigger point: An attacker sends HTTP requests to the REST endpoints that return system and process data.
- Why exploitation is possible: The web server is configured to start without authentication by default, and the REST API returns process command-lines and other telemetry without filtering or redaction, allowing sensitive information to be retrieved by unauthenticated clients.
Why this happens
The underlying issue aligns with CWE-200: Exposure of Sensitive Information to an Unauthorized Actor.
Glances' web server was designed to provide monitoring data over HTTP but did not enforce authentication or access control by default. This meant that any network client could query REST endpoints returning detailed process information, including full command-line arguments. Because many operational practices still pass credentials and tokens via command-line parameters, these unprotected endpoints inadvertently exposed secrets and sensitive system metadata. The core design flaw is treating monitoring data as non-sensitive and making it broadly available over the network without authentication, authorization, or data minimization.
Potential impact
- Disclosure of passwords, API keys, and tokens passed on process command-lines.
- Leakage of database connection strings, cloud credentials, or internal service credentials.
- Exposure of hostnames, internal IP addresses, and process structures that can aid reconnaissance.
- Facilitation of lateral movement or privilege escalation using harvested secrets.
- Increased risk of regulatory or compliance violations due to inadvertent data exposure.
General mitigation guidance
Effective mitigation focuses on reducing exposure of monitoring interfaces and treating system telemetry as sensitive:
- Require authentication and, where possible, authorization checks for any web-based monitoring dashboard or REST API.
- Bind the monitoring service to localhost or a dedicated management network segment rather than all interfaces.
- Place monitoring endpoints behind a hardened reverse proxy that enforces TLS, authentication, and IP-based access controls.
- Minimize sensitive data in process command-lines; Prefer secure configuration mechanisms (environment variables, secrets managers, configuration files with restricted permissions).
- Apply the principle of least privilege to monitoring tools, ensuring they do not run with more access than necessary.
- Document secure deployment defaults and provide administrators with clear guidance on safe exposure boundaries.
How teams detect issues like this
Organizations can identify and monitor this class of exposure using several approaches:
- Configuration and infrastructure review: Periodically audit running services for open monitoring interfaces, especially HTTP ports exposing system metrics or process data without authentication.
- Network scanning: Use internal scanning tools to detect Glances endpoints and validate whether authentication is required and what data is exposed.
- Static and IaC analysis: Check deployment scripts, systemd units, containers, and infrastructure-as-code for
glances -wusage, paying attention to binding addresses and absence of security flags. - Log and access monitoring: Inspect HTTP access logs for unexpected or external access patterns to monitoring endpoints; alert on access from untrusted networks.
- Policy enforcement: Define organizational policies that forbid unauthenticated exposure of monitoring dashboards and use automated checks (CI/CD, configuration compliance scanners) to enforce them.

