CVE-2026-12540

A flaw was found in Foreman. A command injection vulnerability exists in the foreman-rake errors:fetch_log task. The request_id parameter is passed to an underlying system command (typically grep) without adequate shell neutralization. While the task is intended to fetch specific log entries, an attacker with sudo permissions to execute this rake task can inject shell metacharacters (such as ;, ", or |) to break out of the intended command and execute arbitrary code.

  • Published Oct 1, 2026
  • CVSS 8.2 high
  • 1.3% chance of exploitation in the next 30 days (EPSS)
  • A fix is available

Affected software

CVE-2026-12540 at the National Vulnerability Database