A credential leak vulnerability was found in Foreman through Azure Compute Profile. This flaw exposes the compute profile credentials to the all authenticated users with "viewcomputeprofiles" permission.
Dominic Cleal of Red Hat reports:
The "requiressl" setting (in /etc/foreman/settings.yml) should enforce that web requests sent to Foreman over HTTP are redirected to HTTPS, but this was found not to happen with API requests (e.g. from Hammer CLI). Foreman will process API requests over HTTP, but should have redirected.
Redirection won't help with credentials having already been sent, but should give some notification that the user/app is using the wrong URL.
Affects all versions of Foreman since 1.1.
The issue has already been fixed since Foreman 1.9.0-RC1 via a refactor in #10471.
To mitigate this with Apache, add a stanza to the HTTP VirtualHost (e.g. in /etc/httpd/conf.d/05-foreman.d/apiredirect.conf) similar to:
RewriteEngine On RewriteRule ^/api/(.) https://%{SERVERNAME}/api/$1 [R,L]
External reference:
http://projects.theforeman.org/issues/11119
Smart Proxy (aka Smart-Proxy and foreman-proxy) in Foreman before 1.5.4 and 1.6.x before 1.6.2 does not validate SSL certificates, which allows remote attackers to bypass intended authentication and execute arbitrary API requests via a request without a certificate.
A cross-site scripting (XSS) flaw was reported in Foreman's template preview screen. If a user were tricked into viewing a malicious template, it would lead to cross-site scripting attacks. Note that templates are commonly shared among users.
This issue was reported in version 1.6.0; however, older versions may also be vulnerable.
Upstream fix:
https://github.com/theforeman/foreman/pull/1778
References:
http://projects.theforeman.org/issues/7483