Vendor of Product: H3C

Affected Product and Version: H3C M2 V100R006

Description:

In H3C M2 NAS (private cloud storage) V100R006, there is a insecure configuration vulnerability. The device sets both User and Group property in the boa webserver configuration file to root permissions. This violates the principle of least privilege. Any exploit in the web interface can immediately grant root access, leading to total device compromise.

Detail:

In the H3C M2 V100R006 firmware, the partial content of /etc/boa/boa.conf is as follows.

#  User: The name or UID the server should run as.
# Group: The group name or GID the server should run as.

#User nobody
#Group nogroup
User root
Group root

Within, both User and Group properties are set to the root permissions. This violates the principle of least privilege.

The official documentation of boa (http://www.boa.org/documentation/boa-2.html) states the following requirements.

2.4 Security
Boa has been designed to use the existing file system security. In boa.conf, the directives user and group determine who Boa will run as, if launched by root. By default, the user/group is nobody/nogroup. This allows quite a bit of flexibility. For example, if you want to disallow access to otherwise accessible directories or files, simply make them inaccessible to nobody/nogroup. If the user that Boa runs as is "boa" and the groups that "boa" belongs to include "web-stuff" then files/directories accessible by users with group "web-stuff" will also be accessible to Boa.

Clearly, there is a misconfiguration vulnerability here. There is a significant security risk here. It is not set according to the officially recommended security configuration nobody/nogroup. This violates the principle of least privilege. Any exploit in the web interface can immediately grant root access, leading to total device compromise.