# CVE-2026-12541: Foreman OS command injection in rake database tasks

Source: https://junglewise.ai/threats/cve-2026-12541-a-flaw-was-found-in-foreman-os-command-injection-vulnerabilities  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-10-01. Updated: 2026-10-05  
License: CC BY 4.0 with a link back

CVE-2026-12541 · Severity: high · CVSS 8.2 · Published 2026-10-01

Foreman is a systems management platform used to provision and configure enterprise servers. A command injection flaw in the db:dump and db:import_dump rake tasks allows attackers with local access to execute foreman-rake to append arbitrary shell commands through unsanitized file path parameters, potentially compromising the entire managed infrastructure.

Technologies: [Foreman](https://junglewise.ai/threats/technologies/foreman). Vendors: [Foreman](https://junglewise.ai/threats/vendors/foreman).

## Quick answers

**Is CVE-2026-12541 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-12541 being exploited in the wild.

**How severe is CVE-2026-12541?** High severity, with a CVSS score of 8.2, published 1 October 2026.

**Which products and versions are affected?** Foreman <UNKNOWN>.

**Is there a fix for CVE-2026-12541?** No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.

**How is CVE-2026-12541 attacked?** It is attacked with local access, in a hosted service.

**Am I affected by CVE-2026-12541?** Check whether you run Foreman at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

OS command injection vulnerabilities exist in the foreman-rake db:dump and db:import_dump tasks due to insufficient input sanitization of the destination and file parameters before passing them to Ruby system() calls. An attacker with permissions to execute foreman-rake commands (e.g., via sudo) can inject malicious shell metacharacters into these parameters to execute arbitrary OS commands with the privileges of the Foreman process.

## Affected products

- Foreman Foreman <UNKNOWN>

## Timeline

- 2026-10-01: disclosed

## References

- [https://access.redhat.com/downloads/content/package-browser/](https://access.redhat.com/downloads/content/package-browser/)
- [https://access.redhat.com/errata/RHSA-2026:74503](https://access.redhat.com/errata/RHSA-2026:74503)

## Related threats

- [Foreman information disclosure via improper validation in taxonomy_scope](https://junglewise.ai/threats/cve-2026-5138-foreman-information-disclosure-via-improper-validation-in-taxonomy)
- [Foreman broken access control in host lookup value overrides](https://junglewise.ai/threats/cve-2026-5135-foreman-broken-access-control-in-host-lookup-value-overrides)
- [Foreman privilege escalation in Usergroup model](https://junglewise.ai/threats/cve-2026-5136-foreman-privilege-escalation-in-usergroup-model)
- [Foreman command injection in WebSocket proxy](https://junglewise.ai/threats/cve-2026-1961-foreman-command-injection-in-websocket-proxy)
