# 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.

- **Severity:** Critical 9.8 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 7 Apr 2026
- **Updated:** 15 Oct 2026
- **Also known as:** ALSA-2026:7383, ALSA-2026:7384, CLSA-2026-1777452220, DEBIAN-CVE-2026-4631, GHSA-rq49-h582-83m7, MGASA-2026-0099, RHSA-2026:7381, RHSA-2026:7382, RHSA-2026:7383, RHSA-2026:7384, RLSA-2026:7383, RLSA-2026:7384, SUSE-SU-2026:21106-1, SUSE-SU-2026:21184-1, UBUNTU-CVE-2026-4631, openSUSE-SU-2026:10531-1, openSUSE-SU-2026:20523-1

## 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 (Improper Neutralization of Special Elements used in an OS Command)

## Which versions are affected by CVE-2026-4631?


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `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.

## 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:

- Cockpit: Unauthenticated Remote Code Execution via SSH Command-Line Argument Injection (github_poc): https://github.com/cyberheartmi9/CVE-2026-4631-cockpit-RCE
- Cockpit 359 - RCE (exploitdb)
- Unauthenticated Remote Code Execution via SSH Command-Line Argument Injection Cockpit versions 327 – 359 | CVSS 9.8 Critical | CWE-78 (github_poc): https://github.com/ExDev994/CVE-2026-4631-cockpit-RCE
- Cockpit Web Console < 360 - Remote Code Execution (nuclei): http/cves/2026/CVE-2026-4631.yaml

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-4631 and fix it if it is affected.

What it is: 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.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-4631 exists.

Affected product: Red Hat Enterprise Linux 10. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-4631/ (Markdown: https://insights.sbomify.com/CVE-2026-4631/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-4631
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-4631
- OSV: https://osv.dev/vulnerability/CVE-2026-4631

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-4631/
Summaries are generated and may contain mistakes; the official description above is the record.
