cve.bz

CVE-2026-4631 OS Command Injection

9.8 criticalExploitEPSS 15%Fix available

Critical (9.8). EPSS 15% estimated probability of exploitation activity in the next 30 days.

On this page
Cockpit's remote login feature passes user-supplied hostnames and usernames from the web interface to the SSH client without validation or sanitization. An attacker with network access to the Cockpit web service can craft a single HTTP request to the login endpoint that injects malicious SSH options or shell commands, achieving code execution on the Cockpit host without valid credentials. The injection occurs during the authentication flow before any credential verification takes place, meaning no login is required to exploit the vulnerability.

Severity

CVSS 3.1

9.8 critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS
15% (unchanged from 15% a week ago; 9.2% 30 days ago) estimated probability of exploitation activity in the next 30 days; 97th percentile. Scored 2026-11-17. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: total, assessed 2026-04-08. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-78 Improper Neutralization of Special Elements used in an OS Command (OS Command Injection)
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Awaiting analysis
Record from
the NVD, synced

Fix and patched versions

  • Red Hat Red Hat Enterprise Linux 10: fixed in 0:344-3.el10_1
  • Red Hat Red Hat Enterprise Linux 10: fixed in 0:356.1-1.el10_2
  • Red Hat Red Hat Enterprise Linux 10.0 Extended Update Support: fixed in 0:334.1-3.el10_0
  • Red Hat Red Hat Enterprise Linux 9: fixed in 0:356.1-1.el9_8
  • Red Hat Red Hat Enterprise Linux 9: fixed in 0:344-2.el9_7
  • Red Hat Red Hat Enterprise Linux 9.6 Extended Update Support: fixed in 0:334.2-2.el9_6
  • Debian, Red Hat, SUSE, openSUSE, AlmaLinux, Rocky Linux: fixed package versions per release

Ask an AI about this CVE

Show the promptExplain CVE-2026-4631 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-4631?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-4631?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-4631 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Versions

From the CNA's record in the CVE List.

Fixed in

ProductFixed in
Red Hat Enterprise Linux 100:344-3.el10_1
Red Hat Enterprise Linux 100:356.1-1.el10_2
Red Hat Enterprise Linux 10.0 Extended Update Support0:334.1-3.el10_0
Red Hat Enterprise Linux 90:356.1-1.el9_8
Red Hat Enterprise Linux 90:344-2.el9_7
Red Hat Enterprise Linux 9.6 Extended Update Support0:334.2-2.el9_6

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian13cockpit337-1+deb13u1DEBIAN-CVE-2026-4631
Debian14cockpit360-1DEBIAN-CVE-2026-4631
Ubuntu18.04:LTS, 20.04:LTS, 25.10 and 1 morecockpitno fix listedUBUNTU-CVE-2026-4631
Red Hatenterprise_linux:9::appstreamcockpit-storaged, cockpit-packagekit0:344-2.el9_7RHSA-2026:7384
Red Hatenterprise_linux:9::appstreamcockpit-storaged, cockpit-packagekit0:356.1-1.el9_8RHBA-2026:21387
Red Hatenterprise_linux:9::baseoscockpit, cockpit-ws, cockpit-doc and 5 more0:344-2.el9_7RHSA-2026:7384
Red Hatenterprise_linux:9::baseoscockpit, cockpit-ws, cockpit-doc and 5 more0:356.1-1.el9_8RHBA-2026:21387
Red Hatenterprise_linux:10.1cockpit, cockpit-ws, cockpit-doc and 7 more0:344-3.el10_1RHSA-2026:7383
Red Hatenterprise_linux:10.2cockpit, cockpit-ws, cockpit-doc and 7 more0:356.1-1.el10_2RHBA-2026:21388
Red Hatenterprise_linux_eus:10.0cockpit, cockpit-ws, cockpit-doc and 6 more0:334.1-3.el10_0RHSA-2026:7381
Red Hatrhel_eus:9.6::appstreamcockpit-storaged, cockpit-packagekit0:334.2-2.el9_6RHSA-2026:7382
Red Hatrhel_eus:9.6::baseoscockpit, cockpit-ws, cockpit-doc and 4 more0:334.2-2.el9_6RHSA-2026:7382
SUSELinux Enterprise Server 16.0, Linux Enterprise Server for SAP applications 16.0cockpit354-160000.3.1SUSE-SU-2026:21184-1
SUSELinux Enterprise Server 16.0, Linux Enterprise Server for SAP applications 16.0cockpit364-160000.1.1SUSE-SU-2026:22837-1
SUSELinux Enterprise Server 16.0, Linux Enterprise Server for SAP applications 16.0cockpit-machines354-160000.1.1SUSE-SU-2026:22837-1
SUSELinux Enterprise Server 16.0, Linux Enterprise Server for SAP applications 16.0cockpit-packages5-160000.1.1SUSE-SU-2026:22837-1
SUSELinux Enterprise Server 16.0, Linux Enterprise Server for SAP applications 16.0cockpit-podman128-160000.1.1SUSE-SU-2026:22837-1
SUSELinux Enterprise Server 16.0, Linux Enterprise Server for SAP applications 16.0cockpit-repos4.8-160000.1.1SUSE-SU-2026:22837-1
SUSELinux Enterprise Server 16.0, Linux Enterprise Server for SAP applications 16.0cockpit-subscriptions16.2-160000.1.1SUSE-SU-2026:22837-1
SUSELinux Micro 6.2cockpit354-160000.3.1SUSE-SU-2026:21106-1
SUSELinux Micro 6.2cockpit364-160000.1.1SUSE-SU-2026:22770-1
SUSELinux Micro 6.2cockpit-machines354-160000.1.1SUSE-SU-2026:22770-1
SUSELinux Micro 6.2cockpit-podman128-160000.1.1SUSE-SU-2026:22770-1
SUSELinux Micro 6.2cockpit-repos4.8-160000.1.1SUSE-SU-2026:22770-1
1 more for SUSE in the JSON and on SUSE's page.
openSUSELeap 16.0cockpit354-160000.3.1openSUSE-SU-2026:20523-1
openSUSELeap 16.0cockpit364-160000.1.1openSUSE-SU-2026:21399-1
openSUSELeap 16.0cockpit-machines354-160000.1.1openSUSE-SU-2026:21399-1
openSUSELeap 16.0cockpit-packages5-160000.1.1openSUSE-SU-2026:21399-1
openSUSELeap 16.0cockpit-podman128-160000.1.1openSUSE-SU-2026:21399-1
openSUSELeap 16.0cockpit-repos4.8-160000.1.1openSUSE-SU-2026:21399-1
openSUSELeap 16.0cockpit-subscriptions16.2-160000.1.1openSUSE-SU-2026:21399-1
openSUSETumbleweedcockpit360-1.1openSUSE-SU-2026:10531-1
AlmaLinux9cockpit, cockpit-ws, cockpit-doc and 5 more344-2.el9_7ALSA-2026:7384
AlmaLinux10cockpit-doc, cockpit-bridge, cockpit-system and 2 more344-3.el10_1ALSA-2026:7383
Rocky Linux9cockpit0:344-2.el9_7.rocky.0.1RLSA-2026:7384
Rocky Linux10cockpit0:344-3.el10_1.rocky.0.1RLSA-2026:7383

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; AlmaLinux's OSV database, MIT; Rocky Linux's errata, BSD-3-Clause. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE.

Red Hat

Red Hat rates this Critical.

Red Hat's statement

Two configuration factors determine whether a Cockpit installation is vulnerable to remote code execution.

First, the hostname injection attack (injecting SSH options like -oProxyCommand via the URL path) is blocked by OpenSSH 9.6 and later, which validates hostnames and rejects shell metacharacters before establishing a connection. Systems running Cockpit 327 or later with an OpenSSH version older than 9.6 are vulnerable to unauthenticated remote code execution in the default configuration. Systems with OpenSSH 9.6 or later are not vulnerable to this attack path.

Second, the username injection attack (injecting shell commands via the SSH username) requires that the system's SSH configuration uses the %r (remote username) token within a Match exec directive. This is not part of any default OpenSSH configuration. Systems that do not use %r in a Match exec directive are not vulnerable to this attack path, regardless of OpenSSH version.

Both attack paths require network access to the Cockpit web service (port 9090 by default) and that remote host login is enabled, which is the default Cockpit configuration.

This security issue was introduced in Cockpit version 327. Due to that, the cockpit packages as shipped with Red Hat Enterprise Linux 8, and Red Hat Enterprise Linux 9 before release 9.6, were not affected by this flaw.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 10cockpit-0:344-3.el10_1Fixed 2026-04-10RHSA-2026:7383
Red Hat Enterprise Linux 10cockpit-0:356.1-1.el10_2Fixed 2026-05-27RHBA-2026:21388
Red Hat Enterprise Linux 10.0 Extended Update Supportcockpit-0:334.1-3.el10_0Fixed 2026-04-10RHSA-2026:7381
Red Hat Enterprise Linux 9cockpit-0:356.1-1.el9_8Fixed 2026-05-27RHBA-2026:21387
Red Hat Enterprise Linux 9cockpit-0:344-2.el9_7Fixed 2026-04-10RHSA-2026:7384
Red Hat Enterprise Linux 9.6 Extended Update Supportcockpit-0:334.2-2.el9_6Fixed 2026-04-10RHSA-2026:7382
Red Hat Enterprise Linux 7cockpitNot affected
Red Hat Enterprise Linux 8cockpitNot affected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-4631.

Public exploits

GitHub PoC

Repositories on GitHub named after this CVE or listed for it by the PoC-in-GitHub index. For those marked Harbor Check: matches CVE, Flawharbor read the code and found it implements this CVE's exploitation technique: read, not run, and its dependencies only checked for warning signs, so a pointer and no guarantee. The rest are unverified: some hold a working proof of concept, some nothing useful, and some malware made to look like one. Read the code before you run any of it. How Harbor Check reads them, and what it found.

  • cyberheartmi9/CVE-2026-4631-cockpit-RCE Harbor Check: matches CVE 15 stars, Python, created
    Cockpit: Unauthenticated Remote Code Execution via SSH Command-Line Argument Injection
  • ExDev994/CVE-2026-4631-cockpit-RCE Harbor Check: matches CVE 0 stars, Python, created
    Unauthenticated Remote Code Execution via SSH Command-Line Argument Injection Cockpit versions 327 – 359 | CVSS 9.8 Critical | CWE-78

Detection rules

Ways to detect this CVE, not exploit code: the nuclei template that checks a system for it, and the Suricata and Snort rules that name it. A rule set may ship a rule turned off, so check yours by its sid.

Attack patterns (CAPEC)

  • CAPEC-6 Argument Injection Likelihood: High · Severity: High
  • CAPEC-15 Command Delimiters Likelihood: High · Severity: High
  • CAPEC-43 Exploiting Multiple Input Interpretation Layers Likelihood: Medium · Severity: High
  • CAPEC-88 OS Command Injection Likelihood: High · Severity: High
  • CAPEC-108 Command Line Execution through SQL Injection Likelihood: Low · Severity: Very High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON