Summary
In Glances Central Browser mode, Zeroconf-advertised server names are trusted when building connection URIs and looking up stored credentials, instead of using the verified IP address.
On a shared local network, an attacker can advertise a fake Glances service and cause the Central Browser to automatically send reusable authentication secrets to an attacker-controlled host.
Affected context
The vulnerability arises when Glances is used in Central Browser mode with Zeroconf-based discovery of dynamic servers on a local network.
In this mode, Glances:
- Discovers servers via Zeroconf and records both their advertised name and discovered IP
- Later constructs connection URIs using the untrusted advertised name instead of the verified IP
- Uses that same untrusted name as the key for password lookup, including the
[passwords] defaultentry
This behavior is risky in environments where local network service advertisements can be spoofed or interfered with, such as shared Wi‑Fi networks or flat LANs without strong service discovery controls.
Exploit preconditions
- Attack surface: Zeroconf service discovery and subsequent HTTP/REST/WebUI connections in Central Browser mode.
- Required access: The attacker must be on the same local network segment (or be able to inject/mimic Zeroconf traffic) to advertise a fake Glances service.
- Trigger point: The Central Browser:
- Detects the attacker's fake Zeroconf service
- Treats the advertised name as authoritative
- Uses that name to:
- Build a connection URI
- Look up stored passwords and
[passwords] defaultcredentials - Automatically sends authentication data during background polling or when a user clicks through the REST/WebUI interface.
- Why exploitation is possible: The implementation:
- Fails to treat Zeroconf-advertised names as untrusted data
- Relies on the advertised name rather than the verified IP for connecting and credential lookup
- Does not bind stored credentials to a trustworthy identifier (e.g., validated host/IP or cryptographic identity).
Why this happens
The core issue is the improper trust of network-originated identity data from Zeroconf advertisements, combined with insecure credential association.
Glances correctly discovers an IP address for a dynamic server but later discards that trustworthy routing information in favor of the unvalidated advertised name for:
- Constructing connection URIs, and
- Locating saved credentials in configuration/password storage.
This pattern maps to:
- CWE-346: Origin Validation Error — the origin of the advertised name is not adequately validated, and the value is implicitly trusted as representing a legitimate Glances server.
- CWE-522: Insufficiently Protected Credentials — reusable authentication secrets are associated with a spoofable identifier and automatically sent to remote endpoints that have not been strongly authenticated.
Abstractly, the bug class is: binding sensitive operations and secrets to a mutable, attacker-controlled network identifier instead of a verified endpoint or identity, without additional validation or trust checks.
Potential impact
- An attacker-controlled host may receive valid Glances authentication secrets.
- Collected credentials could be reused to access legitimate Glances servers as an authenticated user.
- Attackers can impersonate legitimate servers in the Central Browser view, enabling further misdirection or phishing within the monitoring workflow.
- Compromise of monitored host visibility or configuration if stolen credentials grant privileged access.
- Potential pivot to broader infrastructure monitoring data, which can aid in later attacks (e.g., identifying high-value systems or weakly protected hosts).
General mitigation guidance
Effective mitigation centers on tightening identity binding, credential scoping, and local network trust assumptions:
- Bind connections to verified endpoints: Prefer using the discovered IP or a validated host identity as the canonical connection target, not raw advertised names from Zeroconf or other discovery protocols.
- Harden credential association: Associate stored credentials with stable, verified identifiers (e.g., IP, hostname with DNS verification, or an explicit server ID) rather than transient or spoofable discovery names.
- Reduce automatic credential use: Limit or disable automatic sending of credentials to newly discovered or unverified servers; require a user confirmation step or explicit trust enrollment workflow.
- Constrain discovery trust: Treat Zeroconf and similar discovery inputs as untrusted; layer additional checks such as allowlists, TLS/server certificate validation, or signed discovery records where feasible.
- Apply least privilege and segmentation: Run monitoring infrastructure on segregated management networks, reducing exposure to untrusted local clients and service advertisements.
- Credential hygiene: Encourage unique, scoped passwords for Glances instances instead of shared or "default" credentials, and rotate secrets if discovery behavior changes.
How teams detect issues like this
Detection typically focuses on analyzing how network service discovery data is consumed and how credentials are bound to endpoints:
- Static analysis & code scanning:
- Flag flows where Zeroconf or other discovery metadata directly influences connection URIs or credential lookup keys.
- Identify mapping logic that links credentials to advertised names without IP/identity verification.
- Detect patterns where "default" credentials are applied broadly based on untrusted host identifiers.
- Targeted code review:
- Review Central Browser discovery and connection handling logic for implicit trust of advertised names.
- Examine password storage and retrieval code for weak binding between credentials and server identity.
- Validate that any auto-connect or auto-polling features include appropriate trust checks before sending secrets.
- Runtime and operational monitoring:
- Log and inspect Zeroconf discovery events alongside subsequent outbound connections to confirm that endpoints match expected IPs or hostnames.
- Track when credentials are sent to previously unseen services or unusual hostnames.
- Automated tooling and policy enforcement:
- Integrate security linters or SAST/DAST tools that specialize in network origin validation and credential use into CI pipelines.
- Enforce policies requiring explicit review of features that automatically attach credentials to dynamically discovered services.

