CVE-2026-12540
Received Received - Intake

Foreman Command Injection in rake errors:fetch_log Task

Vulnerability report for CVE-2026-12540, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-10-01

Last updated on: 2026-10-01

Assigner: redhat-SADP

Description

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-10-01
Last Modified
2026-10-01
Generated
2026-10-01
AI Q&A
2026-10-01
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 4 associated CPEs
Vendor Product Version / Range
redhat foreman *
red_hat foreman *
red_hat red_hat_satellite *
red_hat satellite *

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
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 Quick Actions

Instant insights powered by AI
Executive Summary

CVE-2026-12540 is a command injection vulnerability in Foreman's foreman-rake errors:fetch_log task. The request_id parameter is passed to a system command like grep without proper shell neutralization. Attackers with sudo permissions can inject shell metacharacters to execute arbitrary code.

Detection Guidance

Check for unauthorized sudo access to the foreman-rake errors:fetch_log task by reviewing sudo logs. Look for commands containing request_id with shell metacharacters like ;, |, or " in logs or command history.

Impact Analysis

An attacker with sudo permissions could exploit this to escalate privileges from a restricted user to the foreman user and then to root. This would compromise the entire Red Hat Satellite server and the infrastructure it manages.

Compliance Impact

This vulnerability could lead to unauthorized access and control of systems, potentially violating compliance requirements for data protection and security such as GDPR and HIPAA due to compromised confidentiality, integrity, and availability of sensitive data.

Mitigation Strategies

Update Foreman to the latest patched version immediately. If no patch is available, restrict sudo access to the foreman-rake errors:fetch_log task and validate request_id input to only allow alphanumeric characters and dashes.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-12540. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart