Western Digital My Cloud 2.21.119 Authentication Bypass
`------------------------------------------------------------------------
Authentication bypass vulnerability in Western Digital My Cloud
------------------------------------------------------------------------
Remco Vermeulen, Januari 2017
------------------------------------------------------------------------
Abstract
------------------------------------------------------------------------
It was discovered that Western Digital My Cloud is affected by an
authentication bypass vulnerability. By exploiting this vulnerability,
an unauthenticated attacker can bypass the login functionality and gain
full control of the device.
------------------------------------------------------------------------
Tested versions
------------------------------------------------------------------------
This vulnerability was successfully verified on a Western Digital My
Cloud model WDBCTL0020HWT running firmware version 2.21.119. This issue
isn't limited to the model that was used to find this vulnerability
since most of the products in the My Cloud series share the same
(vulnerable) code.
------------------------------------------------------------------------
Fix
------------------------------------------------------------------------
Western Digital has released firmware version 2.21.126 that resolves
this vulnerability. This updated firmware can be downloaded from the
following location:
https://support.wdc.com/downloads.aspx?g=904&lang=en#firmware
------------------------------------------------------------------------
Details
------------------------------------------------------------------------
https://www.securify.nl/advisory/SFY20170102/authentication_bypass_vulnerability_in_western_digital_my_cloud.html
The authentication bypass is possible because the login_check() function first checks if a user is authenticated by looking at the user's session. If the session parameter username is not present the login_check() function performs a check to verify if the cookies username and isAdmin are set. If this is the case, login_check() assumes that the user is logged in (and/or is an administrator). Simply sending a request with the two mentioned cookies and without a session cookie is sufficient for accessing My Cloud as an admin user.
The following code fragment shows the vulnerable code, which can be found in /web/lib/login_checker.php:
function login_check()
{
$ret = 0;
if (isset($_SESSION['username']))
{
if (isset($_SESSION['username']) && $_SESSION['username'] != "")
$ret = 2; //login, normal user
if ($_SESSION['isAdmin'] == 1)
$ret = 1; //login, admin
}
else if (isset($_COOKIE['username']))
{
if (isset($_COOKIE['username']) && $_COOKIE['username'] != "")
$ret = 2; //login, normal user
if ($_COOKIE['isAdmin'] == 1)
$ret = 1; //login, admin
}
return $ret;
}
`
Data
Build on a solid foundation with Vulners data
We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data
Api
Power your application with Vulners API
The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access
App
Assess and manage vulnerabilities with Vulners tools
Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation
08 Feb 2017 00:00Current
0.5Low risk
Vulners AI Score0.5