Where
-Infinity
0
Severity
4
Command Injection

Description

A command injection vulnerability exists in Hammer CLI and the Railties (Ruby on Rails) component distributed with Satellite due to the insecure interpolation of the $EDITOR environment variable into the Ruby system() method. By passing a single interpolated string to system(), the application invokes a system shell (/bin/sh) that interprets shell metacharacters (e.g., ;, |, &).

The following files are affected:

lib/hammercli/utils.rb - openineditor method executes:

--------------------------------------------------------------------------------

system("#{ENV['EDITOR'] || 'vi'} #{f.path}")

--------------------------------------------------------------------------------

railties-7.0.10 , specifically railties-7.0.10/lib/rails/commands/encrypted/encryptedcommand.rb and railties-7.0.10/lib/rails/commands/secrets/secretscommand.rb, the framework handles interactive editing via:

--------------------------------------------------------------------------------

system("#{ENV["EDITOR"]} #{tmppath}")

--------------------------------------------------------------------------------

Impact

This flaw allows a local attacker to execute arbitrary commands within the tool's effective security context. If the utility is run with elevated permissions (e.g., via sudo) while preserving the environment, this leads to root-level privilege escalation.

Recommendations

Use Argument Arrays: Replace system calls that use shell string interpolation with array-based arguments to prevent shell interpretation

Consider updating/upgrading Railties: the version in use (7.0.10) is End-of-Life (EOL). This means the core framework underlying the application will not receive official security patches for this flaw, necessitating manual remediation by the Satellite/Foreman engineering teams or a version upgrade (fixed in the latest version).

First published (updated )
Severity
4

Corey Welton of Red Hat reports:

Description of problem: File '/etc/hammer/cli.modules.d/foreman.yml', which contains passwords, is world-readable.

First published (updated )
Severity
4

Tomas Strachota of Red Hat reports:

It was found that Hammer CLI, a CLI utility for Foreman, did not explicitly set the verifyssl flag for apipie-bindings that disable it by default. As a result the server certificates are not checked and connections are prone to man-in-the-middle attacks.

Upstream issue:

http://projects.theforeman.org/issues/19033

First published (updated )

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