Security Vulnerability Report
中文
CVE-2026-1961 CVSS 8.0 HIGH

CVE-2026-1961

Published: 2026-03-26 13:16:28
Last Modified: 2026-04-08 12:16:21

Description

A flaw was found in Foreman. A remote attacker could exploit a command injection vulnerability in Foreman's WebSocket proxy implementation. This vulnerability arises from the system's use of unsanitized hostname values from compute resource providers when constructing shell commands. By operating a malicious compute resource server, an attacker could achieve remote code execution on the Foreman server when a user accesses VM VNC console functionality. This could lead to the compromise of sensitive credentials and the entire managed infrastructure.

CVSS Details

CVSS Score
8.0
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H

Configurations (Affected Products)

No configuration data available.

Foreman (具体受影响版本请参考官方Red Hat安全公告)

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#!/usr/bin/env python3 """ Conceptual PoC for CVE-2026-1961 (Foreman Command Injection) This demonstrates how a malicious hostname from a compute resource triggers command injection on the Foreman server. """ # Malicious payload: A simple command injection to create a file or reverse shell # The attacker controls the compute resource (e.g., a malicious Libvirt server) # and sets the hostname to this value. MALICIOUS_HOSTNAME = "vm-01.example.com; touch /tmp/pwned; #" def simulate_vulnerable_foreman_logic(hostname): """ Simulates the vulnerable command construction in Foreman's WebSocket proxy. Real code might look like: cmd = "ssh -o StrictHostKeyChecking=no root@{}".format(hostname) """ print(f"[*] Foreman received request for VNC console of: {hostname}") # VULNERABLE COMMAND CONSTRUCTION # In a real scenario, this is passed to os.system() or subprocess.Popen(shell=True) shell_command = f"/usr/bin/ssh -W localhost:5900 root@{hostname}" print(f"[!] Executing command: {shell_command}") # If executed, this would run: /usr/bin/ssh ... [email protected]; touch /tmp/pwned; # # The semicolon allows chaining a second command: 'touch /tmp/pwned' if __name__ == "__main__": print("[+] Attacker setting up malicious compute resource...") simulate_vulnerable_foreman_logic(MALICIOUS_HOSTNAME) print("[+] If exploited, arbitrary code execution achieved on Foreman server.")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-1961", "sourceIdentifier": "[email protected]", "published": "2026-03-26T13:16:27.650", "lastModified": "2026-04-08T12:16:20.597", "vulnStatus": "Awaiting Analysis", "cveTags": [], "descriptions": [{"lang": "en", "value": "A flaw was found in Foreman. A remote attacker could exploit a command injection vulnerability in Foreman's WebSocket proxy implementation. This vulnerability arises from the system's use of unsanitized hostname values from compute resource providers when constructing shell commands. By operating a malicious compute resource server, an attacker could achieve remote code execution on the Foreman server when a user accesses VM VNC console functionality. This could lead to the compromise of sensitive credentials and the entire managed infrastructure."}, {"lang": "es", "value": "Se encontró un fallo en Foreman. Un atacante remoto podría explotar una vulnerabilidad de inyección de comandos en la implementación del proxy WebSocket de Foreman. Esta vulnerabilidad surge del uso por parte del sistema de valores de nombre de host no saneados de proveedores de recursos de cómputo al construir comandos de shell. Al operar un servidor de recursos de cómputo malicioso, un atacante podría lograr la ejecución remota de código en el servidor de Foreman cuando un usuario accede a la funcionalidad de la consola VNC de una VM. Esto podría llevar al compromiso de credenciales sensibles y de toda la infraestructura gestionada."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H", "baseScore": 8.0, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "REQUIRED", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 2.1, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-78"}]}], "references": [{"url": "https://access.redhat.com/errata/RHSA-2026:5968", "source": "[email protected]"}, {"url": "https://access.redhat.com/errata/RHSA-2026:5970", "source": "[email protected]"}, {"url": "https://access.redhat.com/errata/RHSA-2026:5971", "source": "[email protected]"}, {"url": "https://access.redhat.com/security/cve/CVE-2026-1961", "source": "[email protected]"}, {"url": "https://bugzilla.redhat.com/show_bug.cgi?id=2437036", "source": "[email protected]"}, {"url": "http://www.openwall.com/lists/oss-security/2026/03/27/3", "source": "af854a3a-2127-422b-91ae-364da2661108"}]}}