A high severity vulnerability was found in all active versions of Red Hat CloudForms before 5.11.7.0. The out of band OS command injection vulnerability can be exploited by authenticated attacker while setuping conversion host through Infrastructure Migration Solution. This flaw allows attacker to execute arbitrary commands on CloudForms server.
A insecure configuration for certificate verification (http.verifymode = OpenSSL::SSL::VERIFYNONE) may lead to verification bypass in Red Hat CloudForms 5.x.
A code injection flaw was found in the way capacity and utilization imported control files are processed. A remote, authenticated attacker with access to the capacity and utilization feature could use this flaw to execute arbitrary code as the user CFME runs as.
Red Hat CloudForms Management Engine 4.1 does not properly handle regular expressions passed to the expression engine via the JSON API and the web-based UI, which allows remote authenticated users to execute arbitrary shell commands by leveraging the ability to view and filter collections.
It was found that the CloudForms before 5.6.2.2, and 5.7.0.7 did not properly apply permissions controls to VM IDs passed by users. A remote, authenticated attacker could use this flaw to execute arbitrary VMs on systems managed by CloudForms if they know the ID of the VM.
A flaw was found in the CloudForms management engine version 5.10 and CloudForms management version 5.11, which triggered remote code execution through NFS schedule backup. An attacker logged into the management console could use this flaw to execute arbitrary shell commands on the CloudForms server as root.
Jan Rusnacko of the Red Hat Product Security Team reports:
CFME contains an authorization bypass issue in the action rbacuseredit, which allows authenticated users with minimal privileges to gain access to additional privileges.
The problem is in the method checkprivileges in vmdb/app/controllers/applicationcontroller.rb:
def checkgenericrbac ident = "#{controllername}#{actionname}"
if MiqProductFeature.featureexists?(ident) passed = roleallows(:feature => ident, :any => true) unless passed if request.xmlhttprequest? render :update do |page| page.redirectto :controller => 'dashboard', :action => 'autherror' end else redirectto(:controller => 'dashboard', :action => 'autherror') end end passed else validateroute(controllername, request.env['REQUESTMETHOD'], actionname) end end
Since there is no else branch for the "if MiqProductFeature.featureexists?(ident)", any feature that is missing from the list of known features, will be allowed by default. One of these such features is opsrbacuseredit.
This is the same exact place in code that is causing CVE-2014-0078, however, the fix for this issue solves only CVE-2014-0078, not the problem itself. After the fix is applied, privileges for xbutton are checked, but other actions like rbacuseredit are allowed by default.
CloudForms Management Engine before 5.8 includes a default SSL/TLS certificate.
It was found that CloudForms does not verify that the server hostname matches the domain name in the certificate when using a custom CA and communicating with Red Hat Virtualization (RHEV) and OpenShift. This would allow an attacker to spoof RHEV or OpenShift systems and potentially harvest sensitive information from CloudForms.
Red Hat CloudForms 4.7 and 5 was vulnerable to Server-Side Request Forgery (SSRF) flaw. With the access to add Ansible Tower provider, an attacker could scan and attack systems from the internal network which are not normally accessible.
Ruby on Rails uses a HMAC for verifying the integrity of signed cookies. To prevent session hash tampering, a digest is calculated from the session with a server-side secret and inserted into the end of the cookie.
It was found that CloudForms Management Engine (CFME) is using a statically defined secret, which is common across all deployments. A remote attacker could use this statically defined secret to perform a session tampering attack.
External references:
http://blog.phusion.nl/2013/01/04/securing-the-rails-session-secret/ http://blog.mhartl.com/2008/08/15/a-security-issue-with-rails-secret-session-keys/
James Laska (jlaska) reports:
While filing an upstream bug regarding CFME not sanitizing user-input, I discovered it is possible to remotely inject ruby code.
It was found that the MiqPolicyController component of CloudForms Management Engine (CFME) was vulnerable to SQL injection. A remote attacker could use this flaw to execute arbitrary SQL statements in the CFME database.
Jan Rusnacko of Red Hat reports:
current CFME code contains dangerous send in cfme/vmdb/app/controllers/applicationcontroller/performance.rb :
747: prpt.whereclause[2] = @perfrecord.send(@perfoptions[:parent].underscore).id
This calls .send method on @perfrecord, with argument @perfoptions[:parent], which is supplied by user:
29: @perfoptions[:parent] = params[:compareto].blank? ? nil : params[:compareto] if params.haskey?(:compareto)
CloudForms Management Engine (cfme) before 5.7.3 and 5.8.x before 5.8.1 lacks RBAC controls on certain methods in the rails application portion of CloudForms. An attacker with access could use a variety of methods within the rails application portion of CloudForms to escalate privileges.
A stored cross-site scripting (XSS) vulnerability was found in the PDF export component of CloudForms, versions 5.9 and 5.10, due to user input is not properly sanitized. An attacker with least privilege to edit compute is able to execute a XSS attack against other users, which could lead to malicious code execution and extraction of the anti-CSRF token of higher privileged users.
Aaron Patterson of Red Hat reports:
There are a number of locations in the code where .tosym is called on user supplied code, resulting in a potential DoS condition as an attacker can insert symbols that are never garbage collected.
A cross-site script vulnerability was found in CloudForms 5.9.0.10 self-service UI snapshot feature.
A number of unused delete routes are present in CloudForms before 5.7.2.1 which can be accessed via GET requests instead of just POST requests. This could allow an attacker to bypass the protectfromforgery XSRF protection causing the routes to be used. This attack would require additional cross-site scripting or similar attacks in order to execute.
CFME (CloudForms Management Engine) 5: RHN account information is logged to topoutput.log during registration
Internally CFME uses AES-256-CBC encryption to encrypt important data before it is saved in the database. This encryption mode is vulnerable to padding oracle attack and CFME does allow attacker to submit forged ciphertexts for encryption and observe the result.
A flaw was found in the CloudForms web interface, versions 5.8 - 5.10, where the RSS feed URLs are not properly restricted to authenticated users only. An attacker could use this flaw to view potentially sensitive information from CloudForms including data such as newly created virtual machines.
It is reported that CloudForms fails to protect potentially sensitive data stored in the backend PostgreSQL database. This is due to encrypted data being decrypted and then stashed in data structures which may be inadvertently exposed (e.g. through database log files).
The (1) get and (2) log methods in the AgentController in Red Hat CloudForms 3.0 Management Engine (CFME) 5.x allow remote attackers to insert arbitrary text into log files via unspecified vectors.
A logic error in validrole() in CloudForms role validation before 5.7.1.3 could allow a tenant administrator to create groups with a higher privilege level than the tenant administrator should have. This would allow an attacker with tenant administration access to elevate privileges.
A flaw was found in the CloudForms API before 5.6.3.0, 5.7.3.1 and 5.8.1.2. A user with permissions to use the MiqReportResults capability within the API could potentially view data from other tenants or groups to which they should not have access.
Martin Povolny of Red Hat report:
There is a a reflected XSS in application/panelcontrol and a failure to escape JavaScript elements in CFME.
Jan Rusnacko of Red Hat reports:
currently CSRF protection of CFME is based on checking the referer header. Implementation of the check is not strict enough and permits attacker CSRF in certain scenarios. Assuming CFME is running on cfme.host and client's browser sent referer without a full path during authentication, attacker can mount CSRF from domain cfme.host.evil.com, which will bypass CSRF referer check.
Code in the requestrefererservice.rb contains following:
class RequestRefererService def referervalid?(referer, stringtotest) referer.tos.startswith?(stringtotest) end end
This check only makes sure that referer starts with stringtotest, with the assumption that it is FQDN of CFME host. String to test is set in DashboardController in authenticate action:
538: session['referer'] = request.referer.sub(/\?./,'')
When user first authenticates, CFME saves the referer. Login form, from which user fires off authenticate request, is located at the root, so referer should contain URL in form "https://cfme.host/". This is stripped from any parameters and saved to session['referer'], which will again contain "https://cfme.host/" for the rest of the session. Any subsequent user requests must include referer starting with "https://cfme.host/".
Sending referer header raises privacy concerns. To mitigate them, referer sent by the client may not include full URL, but only protocol+hostname instead of full path. This is exactly idea behind original proposal of Origin header (for details see [1]). Stripping full URL to hostname (or just domain) can be achieved by for example by Referer Control addon to Firefox, or perhaps implemented at network level as a part of company security policy.
If the client sends authenticate request without trailing "/", then session['referer'] will contain something like "https://cfme.host", or just "cfme.host", and attacker can simply mount CSRF from "cfme.host.evil.com" and pass the check.
This attack on broken Referer check implementation is described in OWASP CSRF prevention cheat sheet [2].
Thank you.
[1] http://seclab.stanford.edu/websec/csrf/csrf.pdf [2] https://www.owasp.org/index.php/Cross-SiteRequestForgery%28CSRF%29PreventionCheatSheet#CheckingTheRefererHeader
Jan Rusnacko of the Red Hat Product Security Team reports:
Under certain circumstances waitfortask CFME goes into an infinite loop calling waitfortask for ~10 sec until it throws an exception. If called repeatedly an attacker can effectively DoS the server.
A flaw was found in CloudForms's v2v infrastructure mapping delete feature. A stored cross-site scripting in CloudForms 5.9.3.1 build due to improper sanitization of user input in Name field.