<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Glances - CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/vendors/glances/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata. Fed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Fri, 26 Jan 2024 12:00:00 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/vendors/glances/feed.xml" rel="self" type="application/rss+xml"/><item><title>Glances Cross-Origin Information Disclosure via Unauthenticated REST API</title><link>https://feed.craftedsignal.io/briefs/2024-01-26-glances-info-disclosure/</link><pubDate>Fri, 26 Jan 2024 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-26-glances-info-disclosure/</guid><description>Glances versions before 4.5.4 are vulnerable to cross-origin information disclosure, where a malicious website can retrieve sensitive system information from a running Glances instance due to a permissive CORS policy on the `/api/4/all` endpoint.</description><content:encoded><![CDATA[<p>Glances, a system monitoring tool, exposes a REST API (<code>/api/4/*</code>) that is accessible without authentication. Prior to version 4.5.4, a permissive Cross-Origin Resource Sharing (CORS) policy (<code>Access-Control-Allow-Origin: *</code>) allows cross-origin requests from any website. An attacker can exploit this vulnerability by hosting a malicious website that, when visited by a user running Glances in web mode (e.g., <code>glances -w -B 0.0.0.0</code>), can retrieve sensitive system information via the user's browser. This information includes process lists, system details (hostname, OS, CPU info), memory and disk usage, network interfaces and IP addresses, and running services and metrics. The vulnerability, identified as CVE-2026-34839, allows for unauthenticated remote information disclosure.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>A victim starts Glances in web mode using the command <code>glances -w -B 0.0.0.0</code>, exposing the REST API on port 61208.</li>
<li>The victim visits a malicious website controlled by the attacker.</li>
<li>The malicious website contains JavaScript code that sends an HTTP GET request to the Glances API endpoint <code>http://&lt;victim-ip&gt;:61208/api/4/all</code>.</li>
<li>Due to the permissive CORS policy (<code>Access-Control-Allow-Origin: *</code>), the Glances server allows the cross-origin request.</li>
<li>The Glances server responds with a JSON payload containing sensitive system information, including process lists, system details, network configuration, and resource usage.</li>
<li>The malicious JavaScript code parses the JSON response and extracts the sensitive information.</li>
<li>The extracted information is logged to the attacker's console or sent to an attacker-controlled server for analysis and further exploitation.</li>
<li>The attacker uses the disclosed information for reconnaissance, identifying potential targets for further attacks.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of this vulnerability allows a remote, unauthenticated attacker to gather sensitive information about the victim's system. This can lead to a comprehensive system fingerprint, including running processes, network configuration, and internal IP addresses. While the exact number of victims is unknown, any Glances instance running in web mode with a vulnerable version (prior to 4.5.4) is susceptible. This information disclosure can be used for targeted attacks, such as exploiting other vulnerabilities based on the identified software and configurations or performing social engineering attacks based on the disclosed system information.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade Glances to version 4.5.4 or later to patch CVE-2026-34839.</li>
<li>Implement network monitoring rules to detect unusual outbound connections from browsers to port 61208, indicating potential exploitation attempts. See the &quot;Detect Glances API Access from Browser Process&quot; Sigma rule below.</li>
<li>Deploy the Sigma rule &quot;Detect Glances Web Mode Startup&quot; to identify instances of Glances being run in web mode.</li>
<li>Review and restrict network exposure of Glances web interface by modifying the <code>-B</code> parameter, avoiding <code>0.0.0.0</code>, to limit the scope of the exposed API.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>glances</category><category>information-disclosure</category><category>cors</category><category>webserver</category></item><item><title>Glances IP Plugin SSRF Vulnerability Leading to Credential Leakage</title><link>https://feed.craftedsignal.io/briefs/2024-01-03-glances-ssrf/</link><pubDate>Wed, 03 Jan 2024 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-03-glances-ssrf/</guid><description>A server-side request forgery (SSRF) vulnerability exists in the Glances IP plugin due to improper validation of the public_api configuration parameter, allowing attackers to force outbound HTTP requests and potentially leak credentials via the Authorization header.</description><content:encoded><![CDATA[<p>A server-side request forgery (SSRF) vulnerability has been identified in the Glances IP plugin, affecting versions prior to 4.5.4. The vulnerability stems from insufficient validation of the <code>public_api</code> configuration parameter. An attacker with the ability to modify the Glances configuration file can exploit this flaw to force the application to make HTTP requests to arbitrary internal or external endpoints. Furthermore, if <code>public_username</code> and <code>public_password</code> are configured, Glances automatically includes these credentials within the <code>Authorization: Basic</code> header of the outbound requests, leading to potential credential leakage to attacker-controlled servers. This issue allows attackers to probe internal network services, retrieve sensitive data from cloud metadata endpoints (e.g., AWS, Azure, GCP), and exfiltrate credentials. The root cause is the direct usage of the <code>public_api</code> value within the <code>urlopen_auth</code> function without proper validation.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>Attacker gains access to the Glances configuration file (e.g., through compromised credentials or exposed configuration management).</li>
<li>Attacker modifies the <code>glances.conf</code> file, setting <code>public_api</code> to a malicious URL, such as <code>http://127.0.0.1:9999/ssrf-poc</code> or a cloud metadata endpoint (<code>http://169.254.169.254/</code>).</li>
<li>Attacker sets <code>public_username</code> and <code>public_password</code> in the <code>glances.conf</code> file to capture the Basic Authentication header.</li>
<li>The Glances application, particularly the IP plugin, reads the modified configuration file during startup or refresh.</li>
<li>The <code>ThreadPublicIpAddress</code> class initiates an HTTP request to the attacker-controlled URL using the <code>urlopen_auth</code> function in <code>glances/globals.py</code>.</li>
<li>The <code>urlopen_auth</code> function sends the request with the <code>Authorization: Basic</code> header containing the configured username and password, to the attacker controlled endpoint.</li>
<li>The attacker's server receives the request, captures the leaked credentials from the Authorization header, and potentially uses them for further exploitation.</li>
<li>The Glances API endpoint <code>/api/4/ip</code> reflects the attacker-controlled data, potentially injecting arbitrary information into the application.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of this SSRF vulnerability can have several serious consequences. Attackers can gain unauthorized access to internal network services and sensitive data residing on the local machine or within the internal network. Credential leakage, due to the inclusion of usernames and passwords in the Authorization header, can lead to further compromise of other systems and services. Cloud metadata endpoints can be queried to obtain sensitive credentials for cloud environments (AWS, Azure, GCP). Furthermore, by manipulating the response received from the attacker-controlled server, arbitrary data can be injected into the Glances application, potentially leading to further exploitation or disruption of services.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Deploy the following Sigma rule to detect modifications to the Glances configuration file to identify potential exploitation attempts.</li>
<li>Apply input validation to the <code>public_api</code> configuration parameter within the Glances IP plugin to enforce scheme restrictions (http/https only) and validate the destination host, mitigating SSRF vulnerabilities as detailed in the overview.</li>
<li>Implement network segmentation to limit the impact of successful SSRF attacks by restricting access to internal resources from the Glances server.</li>
<li>Monitor network connections originating from the Glances server for suspicious outbound traffic to internal or cloud metadata IP ranges.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>ssrf</category><category>credential-leakage</category><category>python</category></item><item><title>Glances Command Injection Vulnerability via Dynamic Configuration</title><link>https://feed.craftedsignal.io/briefs/2024-01-glances-command-injection/</link><pubDate>Tue, 02 Jan 2024 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-glances-command-injection/</guid><description>Glances versions 4.5.2 and earlier are vulnerable to command injection via dynamic configuration values, allowing arbitrary command execution with the privileges of the Glances process if an attacker can modify or influence configuration files, potentially leading to privilege escalation.</description><content:encoded><![CDATA[<p>Glances, a system monitoring tool, contains a command injection vulnerability in versions 4.5.2 and earlier. The vulnerability stems from the dynamic configuration parsing in <code>Config.get_value()</code>, where substrings enclosed in backticks are interpreted and executed as system commands. This behavior occurs without proper validation or restriction, allowing an attacker to inject arbitrary commands. If an attacker can modify or influence the Glances configuration files, these commands will execute automatically with the privileges of the Glances process. This is particularly concerning in deployments where Glances runs with elevated privileges, such as when it is configured as a system service. The vulnerability is tracked as CVE-2026-33641.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>Attacker gains access to the Glances configuration file (e.g., through misconfigured file permissions, shared writable directories, or compromised configuration management systems).</li>
<li>Attacker modifies the configuration file to include a malicious command within backticks in a configuration value (e.g., <code>url_prefix = 'id'</code>).</li>
<li>Glances is started or the configuration is reloaded.</li>
<li>During configuration parsing, the <code>Config.get_value()</code> function in <code>glances/config.py</code> identifies the backtick-enclosed substring.</li>
<li>The identified command is extracted and passed to the <code>system_exec()</code> function in <code>glances/globals.py</code>.</li>
<li><code>system_exec()</code> executes the command using <code>subprocess.run()</code> effectively running the injected code on the host.</li>
<li>The output of the executed command replaces the original configuration value.</li>
<li>The attacker achieves arbitrary command execution with the privileges of the Glances process, potentially leading to privilege escalation if Glances runs with elevated permissions.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of this vulnerability allows an attacker to execute arbitrary commands on the system with the privileges of the Glances process. If Glances is running as root or another privileged user, this can lead to full system compromise and privilege escalation. The vulnerability affects any system where Glances versions 4.5.2 or earlier is installed and the configuration file is modifiable by a malicious actor. Scenarios include misconfigured file permissions allowing unauthorized config modification, shared systems where configuration directories are writable by multiple users, container environments with mounted configuration volumes, and automated configuration management systems that ingest untrusted data.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade Glances to a version greater than 4.5.2 to patch CVE-2026-33641.</li>
<li>Implement strict file permission controls on Glances configuration files to prevent unauthorized modification (reference Attack Chain step 1).</li>
<li>Deploy the Sigma rule <code>Detect Glances Configuration Command Injection</code> to detect attempts to exploit this vulnerability by monitoring process creation events after config file modification.</li>
<li>Monitor file integrity of Glances configuration files using a file integrity monitoring (FIM) system and alert on unauthorized changes to configuration files (reference Attack Chain step 2).</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>glances</category><category>command-injection</category><category>privilege-escalation</category><category>cve-2026-33641</category></item></channel></rss>