CVE-2026-4631
CRITICAL NUCLEICockpit: cockpit: unauthenticated remote code execution due to ssh command-line argument injection
Title source: cnaExploitation Summary
EIP tracks 3 public exploits for CVE-2026-4631. PoCs published by Abdelazim Mohammed, Hex0rc1st, cyberheartmi9. A Nuclei detection template is also available.
AI-analyzed exploit summary This exploit demonstrates an unauthenticated remote code execution vulnerability in Cockpit (versions 327-359) via SSH argument injection. It leverages two attack vectors: hostname-based ProxyCommand injection and username-based token injection to execute arbitrary commands.
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.
Exploits (3)
This exploit demonstrates an unauthenticated remote code execution vulnerability in Cockpit (versions 327-359) via SSH argument injection. It leverages two attack vectors: hostname-based ProxyCommand injection and username-based token injection to execute arbitrary commands.
This repository provides a detailed technical analysis of CVE-2026-4631, an unauthenticated RCE vulnerability in Cockpit due to improper sanitization of hostname and username inputs passed to the SSH binary. The writeup includes root cause analysis, vulnerable code snippets, patch comparisons, and architectural context.
Nuclei Templates (1)
title:"Cockpit"
title="Cockpit"
References (7)
Scores
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H