CVE-2026-1961
Command Injection in Foreman WebSocket Proxy Enables RCE
Publication date: 2026-03-26
Last updated on: 2026-04-08
Assigner: Red Hat, Inc.
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| redhat | foreman | * |
| redhat | foreman | to 3.17.0 (inc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-78 | The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. |
Attack-Flow Graph
AI Powered Q&A
How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:
This vulnerability allows remote code execution on the Foreman server, potentially leading to the compromise of sensitive credentials and the entire managed infrastructure.
Such a compromise could result in unauthorized access to sensitive data, which may violate data protection requirements under standards and regulations like GDPR and HIPAA.
Specifically, exposure of database credentials and encryption keys could lead to breaches of confidentiality, integrity, and availability of protected information.
Therefore, organizations using affected versions of Foreman could face compliance risks if this vulnerability is exploited.
Can you explain this vulnerability to me?
CVE-2026-1961 is a critical remote code execution vulnerability in Foreman's WebSocket proxy implementation. It occurs because Foreman uses unsanitized hostname values from compute resource providers when constructing shell commands.
An attacker who controls a malicious compute resource server (such as a fake VMware vSphere or Libvirt server) can send crafted hostname values. When a Foreman administrator configures this malicious server as a compute resource and accesses the VM console, the attacker can execute arbitrary commands on the Foreman server.
This flaw allows the attacker to run commands as the foreman user, exposing sensitive data like database credentials and encryption keys, which can then be used to decrypt all stored infrastructure credentials and potentially compromise the entire managed infrastructure.
How can this vulnerability impact me? :
This vulnerability can lead to remote code execution on the Foreman server, allowing an attacker to gain control over the system.
The attacker can access sensitive credentials such as database passwords and encryption keys, which can be used to decrypt other stored credentials like those for vCenter, AWS, SSH keys, and API tokens.
With these credentials, the attacker can pivot and compromise the entire managed infrastructure, potentially causing severe damage including data breaches, service disruption, and loss of control over critical systems.
How can this vulnerability be detected on my network or system? Can you suggest some commands?
This vulnerability can be detected by verifying if a malicious compute resource server is configured in Foreman and by checking for signs of remote code execution on the Foreman server.
- Check for attacker-created files on the Foreman server, which may indicate exploitation.
- Review Foreman compute resource configurations to identify any untrusted or suspicious compute resource providers.
- Monitor network traffic for connections to unknown or suspicious compute resource servers.
- No specific commands are provided in the available resources, but typical commands might include searching for unexpected files or processes on the Foreman server, e.g., using 'find' or 'ps' commands.
What immediate steps should I take to mitigate this vulnerability?
The immediate mitigation step is to apply the available patch that sanitizes hostname values and changes the command execution method to prevent shell injection.
- Update Foreman to a version that includes the patch fixing the WebSocket proxy command injection vulnerability.
- Avoid configuring untrusted or unknown compute resource providers in Foreman.
- Restrict access to the Foreman server and its VM console functionality to trusted administrators only.
- Monitor for suspicious activity and signs of compromise until the patch is applied.