# CVE-2026-12540: Foreman: command injection in foreman-rake errors:fetch_log via request_id parameter

- Severity: High 8.2 (CVSS:3.1, scored by redhat) `CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.24%, higher than 70% of CVEs (2026-12-01)
- Published: 2026-10-01T16:22:02.990Z
- Modified: 2026-11-26T14:17:22.340Z
- Weaknesses: CWE-78
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: redhat

## 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.

(As written by CVE List.)

## Affected

- foreman: no versions given (not affected: from 0:3.12.0.23-1.el8sat before *; from 0:3.12.0.23-1.el9sat before *; from 0:3.14.0.22-1.el9sat before *; from 0:3.16.0.25-1.el9sat before *; from 0:3.18.0.14-1.el9sat before *)
- satellite:el8/foreman: no versions given
- redhat satellite: from 6.16 before 6.16.4; from 6.17 before 6.17.12; from 6.19 before 6.19.5; from 6.18 before 6.18.10; 6.0
- theforeman foreman: no versions given

## References

- <https://access.redhat.com/errata/RHSA-2026:74503> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:74504> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:74505> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:74506> (vendor-advisory)
- <https://access.redhat.com/security/cve/CVE-2026-12540> (vdb-entry, vendor-advisory)
- <https://bugzilla.redhat.com/show_bug.cgi?id=2489969> (issue-tracking, mitigation, vendor-advisory)
- <http://www.openwall.com/lists/oss-security/2026/10/07/9> (third-party-advisory)

## Sources

- CVE List: [CVE-2026-12540](https://www.cve.org/CVERecord?id=CVE-2026-12540), CVE Terms of Use, modified 2026-11-26
- NVD: [CVE-2026-12540](https://nvd.nist.gov/vuln/detail/CVE-2026-12540), Public domain, modified 2026-11-26

---

Page: https://cve.day/CVE-2026-12540 · Whole record: https://cve.day/CVE-2026-12540.json · Rebuilt by cve.day 2026-11-26T14:32:12.724Z
