Remote Code Execution in Foreman via Safemode Sandbox Bypass
An authenticated, low-privileged attacker can achieve remote code execution in Foreman by bypassing the templating engine's safemode sandbox to invoke unauthorized functions.
CVE search metadata
CVE search record: CVE-2026-96658. Severity: critical. CVSS: 9.9. KEV: no. Product: Foreman. Brief: Remote Code Execution in Foreman via Safemode Sandbox Bypass. Brief link: https://feed.craftedsignal.io/briefs/2026-10-foreman-rce/
CVE search record: CVE-2026-96659. Severity: critical. CVSS: 9.1. KEV: no. Product: Foreman. Brief: Remote Code Execution in Foreman via Safemode Sandbox Bypass. Brief link: https://feed.craftedsignal.io/briefs/2026-10-foreman-rce/
CVE search record: CVE-2026-12540. Severity: high. CVSS: 8.2. KEV: no. Product: Foreman. Brief: Remote Code Execution in Foreman via Safemode Sandbox Bypass. Brief link: https://feed.craftedsignal.io/briefs/2026-10-foreman-rce/
CVE search record: CVE-2026-12544. Severity: high. CVSS: 7.7. KEV: no. Product: Foreman. Brief: Remote Code Execution in Foreman via Safemode Sandbox Bypass. Brief link: https://feed.craftedsignal.io/briefs/2026-10-foreman-rce/
What's new
CVE-2026-96658 is a critical security vulnerability impacting Foreman, a lifecycle management tool for physical and virtual servers. The flaw exists within the application's templating engine, specifically regarding the implementation of the safemode sandbox designed to restrict untrusted code execution.
The vulnerability allows an authenticated attacker with low-level permissions to manipulate the templating engine by abusing the handling of delegated methods. By appending unauthorized functions to the application's allowed execution list, the attacker can break out of the sandbox environment. This results in the ability to execute arbitrary commands with the privileges of the underlying web server process. Given the core management capabilities of Foreman, successful exploitation provides a significant vector for full infrastructure compromise. Defenders should prioritize updating Foreman instances to the latest patched version once available.
Impact
The vulnerability allows authenticated attackers to move from low-level access to full remote code execution on the hosting server. This capability enables complete control over the Foreman instance, potential lateral movement into managed compute nodes, and access to stored credentials or system configuration data.
Recommendation
Prioritize patching Foreman as soon as the vendor releases the security update addressing CVE-2026-96658. Until a patch is available, audit user access levels and restrict template management permissions to trusted administrative roles to minimize the pool of potential attackers.
Immediate actions
Review access logs for template modifications by low-privileged user accounts
Mitigations
Monitor vendor channels for security patches addressing CVE-2026-96658 and apply to all instances
CVE-2026-96658