CVE-2026-12542: Foreman: command injection in foreman-tail

Published Jun 17, 2026
·
Updated

A flaw was found in Foreman. The foreman-tail utility is vulnerable to OS command injection due to the unsafe use of the eval command. The script takes user-supplied arguments and incorporates them directly into a string that is then executed by eval to expand file paths. Because the input is not sanitized or quoted, a local attacker can inject shell metacharacters (e.g., ;, &, |) to execute arbitrary system commands.

Other sources

Description

The foreman-tail utility in Red Hat Satellite is vulnerable to OS command injection due to the unsafe use of the eval command. The script takes user-supplied arguments and incorporates them directly into a string that is then executed by eval to expand file paths. Because the input is not sanitized or quoted, a local attacker can inject shell metacharacters (e.g., ;, &, |) to execute arbitrary system commands.

Impact

Successful exploitation allows a local attacker to escape restricted shells and execute arbitrary commands on the Satellite server. Consequently, the attacker could access sensitive information that could lead to remote code execution (RCE) and lateral movement across the managed infrastructure.

Recommendations

Refactor the script: Remove the use of eval. Use native shell array expansion or find to locate the necessary log files safely.

Input Validation: Implement a strict allow-list to ensure only valid service names are processed.

— Red Hat

Affected Software

13 affected components
Foreman foreman-tail<3.19.2, <5.0.1
All of the following
redhat Satellite>=6.16<6.16.4
Any of the following
redhat Enterprise Linux=8.0
redhat Enterprise Linux=9.0
All of the following
redhat Satellite>=6.17<6.17.12
redhat Enterprise Linux=9.0
All of the following
redhat Satellite>=6.19<6.19.5
redhat Enterprise Linux=9.0
theforeman foreman>=1.5.0<=3.19.1
theforeman foreman=5.0.0
All of the following
redhat Satellite>=6.18<6.18.10
redhat Enterprise Linux=9.0
redhat Satellite=6.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade Foreman (foreman-tail) to a version that resolves this vulnerability.

    Fixed in 3.19.2
  2. Upgrade

    Upgrade Foreman (foreman-tail) to a version that resolves this vulnerability.

    Fixed in 5.0.1
  3. Configuration

    Implement a strict allow-list so that only valid service names are processed.

    foreman-tail service-name input validation = strict allow-list
  4. Configuration

    Refactor foreman-tail to remove eval; use native shell array expansion or find to locate log files safely.

    foreman-tail command execution = do not use eval

Event History

Jun 17, 2026
Data Sourced
via Red Hat·04:48 PM
DescriptionSeverityAffected Software
Oct 1, 2026
CVE Published
via MITRE·05:14 PM
Data Sourced
via MITRE·05:14 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·06:17 PM
RemedyDescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

Who can exploit this issue?

A local attacker who can supply arguments to the foreman-tail utility can exploit it. The issue is particularly relevant where restricted-shell users can access the utility, because exploitation can allow them to escape shell restrictions.

2

What does an attacker need to provide to trigger the injection?

The attacker needs to pass user-controlled foreman-tail arguments containing shell metacharacters such as semicolons, ampersands, or pipes. Those arguments are incorporated into a string executed through eval without sanitization or quoting.

3

What is the likely impact after successful exploitation?

An attacker can execute arbitrary system commands on the Satellite server. This may expose sensitive information and could support further remote code execution or lateral movement across managed infrastructure.

4

Are fixes available?

The provided references list Red Hat errata RHSA-2026:74503, RHSA-2026:74504, and RHSA-2026:74506. Consult the applicable erratum for the affected deployment.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203