Security researchers have identified a high-severity vulnerability in Foreman, the popular open-source lifecycle management tool used by system administrators to provision and orchestrate thousands of servers. The flaw, tracked as CVE-2026-1961 with a CVSS score of 8.0, could allow an attacker to gain full control over a Foreman server via a clever command injection attack.
Foreman is a cornerstone of infrastructure automation, managing everything from bare-metal deployments to cloud-based virtual machines. However, this latest discovery highlights a critical weakness in how the platform handles data from external compute resource providers like VMware vSphere and Libvirt.
The vulnerability resides within Foreman’s WebSocket proxy implementation, which is responsible for providing console access to managed virtual machines.
The issue arises when the system constructs shell commands using hostname values retrieved from compute resource providers. These hostname values are not properly sanitized. If an attacker operates a malicious compute resource server, they can inject specialized characters into the hostname field.
When an unsuspecting administrator attempts to access the VM console functionality through the Foreman web frontend, the malicious hostname is executed as a shell command. This leads to Remote Code Execution (RCE) on the Foreman server itself, potentially compromising the entire managed infrastructure.
This vulnerability impacts a wide range of deployments, specifically affecting Foreman versions up to and including 3.18.0. The flaw has been documented in detail under Redmine issue #39121 and addressed in GitHub PR 10921.
The Foreman project has moved swiftly to release patches. Administrators are urged to update their installations to one of the following secure versions immediately:
- Foreman 3.18.1
- Foreman 3.17.2
- Foreman 3.16.3
Updating ensures that hostname values are correctly sanitized before being passed to the shell, effectively closing the door on this injection vector.
Support Our Threat Intelligence
If you find our CVE report and cybersecurity news helpful, consider supporting our work.