CVE-2026-12540

Foreman: command injection in foreman-rake errors:fetch_log via request_id parameter

Published Oct 1, 2026 CVSS 3.1 · 8.2 High EPSS 1.2% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

A command injection flaw exists in a Foreman rake task that is designed to fetch log entries. The request_id parameter is fed directly into a shell command (typically grep) without adequate sanitization, allowing an attacker who can execute the rake task with sudo privileges to inject shell meta‑characters and run arbitrary commands. This yields full system compromise for the account performing the task and can expose all data the account has access to. The weakness is identified as CWE-78, which denotes OS command injection.

Affected Systems

The vulnerability affects Red Hat Satellite 6, including the 6.19 release for RHEL 9, as well as associated capsule and utilities components. The affected packages are those that provide the foreman‑rake errors:fetch_log command; the advisory recommends updating any installed Satellite 6 RPMs that contain this task.

Risk and Exploitability

The CVSS score of 8.2 indicates a high impact and ease of exploitation, but the attack requires that the attacker already possess sufficient privileges to invoke the rake task. The EPSS score of 1% indicates a very low but non‑zero exploitation probability. The location is not listed in the CISA KEV catalog, suggesting that no widespread, zero‑day exploitation is known at this time. Nevertheless, the high severity rating and ability for arbitrary code execution make this a critical issue pending a vendor fix.

Remediation

Vendor Workaround

Red Hat has investigated whether a possible mitigation exists for this issue, and has not been able to identify a practical example. Please update the affected package as soon as possible.


OpenCVE Recommended Actions

  • Install the latest Red Hat Satellite packages that contain the patched foreman‑rake errors:fetch_log task; the RHSA advisory provides the relevant RPMs.
  • Limit the execution of the rake task to trusted administrators only; remove sudo access for users who do not need it.
  • Enforce input validation by wrapping the request_id parameter or by configuring the rake task to run without shell expansion (e.g., using Array‑based arguments) as a temporary workaround while awaiting a patch.

Generated by OpenCVE AI on October 2, 2026 at 14:54 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
First Time appeared Redhat enterprise Linux
CPEs cpe:2.3:a:redhat:satellite:*:*:*:*:*:*:*:*
cpe:2.3:a:redhat:satellite:6.0:*:*:*:*:*:*:*
cpe:2.3:a:theforeman:foreman:-:*:*:*:*:*:*:*
cpe:2.3:o:redhat:enterprise_linux:8.0:*:*:*:*:*:*:*
cpe:2.3:o:redhat:enterprise_linux:9.0:*:*:*:*:*:*:*
Vendors & Products Redhat enterprise Linux
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Theforeman
Theforeman foreman
Vendors & Products Theforeman
Theforeman foreman
Type Values Removed Values Added
CPEs cpe:/a:redhat:satellite:6.17::el9
cpe:/a:redhat:satellite_capsule:6.17::el9
cpe:/a:redhat:satellite_utils:6.17::el9
References
Type Values Removed Values Added
CPEs cpe:/a:redhat:satellite:6.16::el8
cpe:/a:redhat:satellite:6.16::el9
cpe:/a:redhat:satellite:6.18::el9
cpe:/a:redhat:satellite_capsule:6.16::el8
cpe:/a:redhat:satellite_capsule:6.16::el9
cpe:/a:redhat:satellite_capsule:6.18::el9
cpe:/a:redhat:satellite_utils:6.16::el8
cpe:/a:redhat:satellite_utils:6.16::el9
cpe:/a:redhat:satellite_utils:6.18::el9
References
Type Values Removed Values Added
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.
Title Foreman: command injection in foreman-rake errors:fetch_log via request_id parameter
First Time appeared Redhat
Redhat satellite
Redhat satellite Capsule
Redhat satellite Utils
Weaknesses CWE-78
CPEs cpe:/a:redhat:satellite:6
cpe:/a:redhat:satellite:6.19::el9
cpe:/a:redhat:satellite_capsule:6.19::el9
cpe:/a:redhat:satellite_utils:6.19::el9
Vendors & Products Redhat
Redhat satellite
Redhat satellite Capsule
Redhat satellite Utils
References
Metrics cvssV3_1

{'score': 8.2, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H'}

Weaknesses
  • CWE-78

    Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

Sources

Status
PUBLISHED
Assigner
redhat
Published
Updated
Nov 2, 2026, 6:01 PM
Reserved
Jun 17, 2026, 5:41 PM
Status
Analyzed
Published
Oct 1, 2026, 5:17 PM
Modified
Oct 8, 2026, 1:16 PM
Severity
Important
Public date
Oct 1, 2026, 12:20 PM