Alexander Wels of Red Hat reported vulnerability allowing anybody possessing SuperUser role on any Entity to remotely execute arbitrary code as root on any host in RHEV environment. The vulnerability is in the feature that allows to view logs that reside on the hosts from inside the UI by selecting the log from the UI. It happens as following:
/* http request to /redhat-support-plugin-
rhev/logs?path=<path+filename>&machine=<name of machine selected>/
/* servlet handles the request, and passes the <path+filename> to an ssh client
/* The ssh client connects to the selected machine and executes as root/
/ 'stat - c %s ' + <path+filename>/
Nowhere in this sequence is the <path+filename> checked or validated. The only validation that happens is that the session associated with the request has the 'SuperUser' role. It doesn't matter what entity the role is on, it just has to have that role on any entity in the RHEV system. With fairly simple url parameter manipulation, an arbitrary code can be executed as root on any host in the RHEV system. Note that SuperUser on an Entity != ROOT on the hosts.
Removing the log viewer plugin will prevent exploitation of this issue.
This issue has been addressed in the following products:
RHEV Manager version 3.6
Via RHSA-2016:0426 https://rhn.redhat.com/errata/RHSA-2016-0426.html
This functionality was added in commit b1db7cc89ac3da23c72dc97844f8be26f54973d2 on Fri Apr 18 09:32:12 2014 which was introduced in RHEV 3.4, and then removed in RHEV 3.6.
Name: Alexander Wels (Red Hat)