CVE-2026-4631 Cockpit: cockpit: unauthenticated remote code execution due to ssh command-line argument injection
Unauthenticated attackers can execute arbitrary code on Cockpit hosts by injecting SSH commands via the login endpoint.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2026-4631?
CVE-2026-4631 is a critical command injection vulnerability in Red Hat Enterprise Linux 10, published on 7 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
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.
Weakness: CWE-78
Which versions are affected by CVE-2026-4631?
Linux distribution packages (40)
cockpit-bridge AlmaLinux:10 | All versions | 344-3.el10_1 |
cockpit-doc AlmaLinux:10 | All versions | 344-3.el10_1 |
cockpit-packagekit AlmaLinux:10 | All versions | 344-3.el10_1 |
cockpit-storaged AlmaLinux:10 | All versions | 344-3.el10_1 |
cockpit-system AlmaLinux:10 | All versions | 344-3.el10_1 |
cockpit AlmaLinux:9 | All versions | 344-2.el9_7 |
cockpit-bridge AlmaLinux:9 | All versions | 344-2.el9_7 |
cockpit-doc AlmaLinux:9 | All versions | 344-2.el9_7 |
cockpit-packagekit AlmaLinux:9 | All versions | 344-2.el9_7 |
cockpit-storaged AlmaLinux:9 | All versions | 344-2.el9_7 |
cockpit-system AlmaLinux:9 | All versions | 344-2.el9_7 |
cockpit-ws AlmaLinux:9 | All versions | 344-2.el9_7 |
cockpit-ws-selinux AlmaLinux:9 | All versions | 344-2.el9_7 |
cockpit Red Hat:enterprise_linux:10.1 | All versions | 0:344-3.el10_1 |
cockpit-bridge Red Hat:enterprise_linux:10.1 | All versions | 0:344-3.el10_1 |
cockpit-debuginfo Red Hat:enterprise_linux:10.1 | All versions | 0:344-3.el10_1 |
cockpit-debugsource Red Hat:enterprise_linux:10.1 | All versions | 0:344-3.el10_1 |
cockpit-doc Red Hat:enterprise_linux:10.1 | All versions | 0:344-3.el10_1 |
cockpit-packagekit Red Hat:enterprise_linux:10.1 | All versions | 0:344-3.el10_1 |
cockpit-storaged Red Hat:enterprise_linux:10.1 | All versions | 0:344-3.el10_1 |
cockpit-system Red Hat:enterprise_linux:10.1 | All versions | 0:344-3.el10_1 |
cockpit-ws Red Hat:enterprise_linux:10.1 | All versions | 0:344-3.el10_1 |
cockpit-ws-selinux Red Hat:enterprise_linux:10.1 | All versions | 0:344-3.el10_1 |
cockpit-packagekit Red Hat:enterprise_linux:9::appstream | All versions | 0:344-2.el9_7 |
cockpit-storaged Red Hat:enterprise_linux:9::appstream | All versions | 0:344-2.el9_7 |
cockpit Red Hat:enterprise_linux:9::baseos | All versions | 0:344-2.el9_7 |
cockpit-bridge Red Hat:enterprise_linux:9::baseos | All versions | 0:344-2.el9_7 |
cockpit-debuginfo Red Hat:enterprise_linux:9::baseos | All versions | 0:344-2.el9_7 |
cockpit-debugsource Red Hat:enterprise_linux:9::baseos | All versions | 0:344-2.el9_7 |
cockpit-doc Red Hat:enterprise_linux:9::baseos | All versions | 0:344-2.el9_7 |
cockpit-system Red Hat:enterprise_linux:9::baseos | All versions | 0:344-2.el9_7 |
cockpit-ws Red Hat:enterprise_linux:9::baseos | All versions | 0:344-2.el9_7 |
cockpit-ws-selinux Red Hat:enterprise_linux:9::baseos | All versions | 0:344-2.el9_7 |
cockpit Red Hat:enterprise_linux_eus:10.0 | All versions | 0:334.1-3.el10_0 |
cockpit-bridge Red Hat:enterprise_linux_eus:10.0 | All versions | 0:334.1-3.el10_0 |
cockpit-debuginfo Red Hat:enterprise_linux_eus:10.0 | All versions | 0:334.1-3.el10_0 |
cockpit-debugsource Red Hat:enterprise_linux_eus:10.0 | All versions | 0:334.1-3.el10_0 |
cockpit-doc Red Hat:enterprise_linux_eus:10.0 | All versions | 0:334.1-3.el10_0 |
cockpit-packagekit Red Hat:enterprise_linux_eus:10.0 | All versions | 0:334.1-3.el10_0 |
cockpit-storaged Red Hat:enterprise_linux_eus:10.0 | All versions | 0:334.1-3.el10_0 |
How do I fix CVE-2026-4631?
Apply the vendor's patch.
Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.
Is CVE-2026-4631 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-4631 exists.
Public exploit code: 1 Exploit-DB entry, 1 Nuclei template and 2 proofs of concept on GitHub.
Sources
Also known as ALSA-2026:7383, ALSA-2026:7384, CLSA-2026-1777452220, DEBIAN-CVE-2026-4631, GHSA-rq49-h582-83m7, MGASA-2026-0099 and 11 more.