A security researcher claims he discovered a critical vulnerability in Apple’s password reset feature that could have been used to take over any iCloud account, but Apple has downplayed the impact of the flaw.
The issue, researcher Laxman Muthiyah says, was a bypass of the various security measures Apple has in place to prevent attempts to brute force the ‘forgot password’ functionality for Apple accounts.
When attempting to reset a password, the user is prompted to provide their phone number or email address to receive a 6-digit one-time passcode.
Thus, an attacker looking to take over the account, first needs to know the victim’s phone number or email address, and then to correctly guess the 6-digit code or be able to try all of the roughly 1 million possibilities.
To prevent brute-forcing of this code, Apple limited the number of attempts one can make to 5, and also limited the number of concurrent POST requests to the same server from the same IP address to 6, which means that an attacker would need 28,000 IP addresses to send a million requests.
As an additional security measure, Apple also blacklisted cloud service providers and appears to automatically reject POST requests coming from many of them, including AWS and Google Cloud. However, the researcher discovered that an attacker could send the requests using cloud services that are not blocked, enabling them to brute-force the 6-digit code and gain access to the targeted iCloud account.
“Of course the attack isn’t easy to do, we need to have a proper setup to successfully exploit this vulnerability,” Muthiyah explained. “First we need to bypass the SMS 6 digit code then 6 digit code received in the email address. Both bypasses are based on same method and environment so we need not change anything while trying the second bypass. Even if the user has two factor authentication enabled, we will still be able to access their account, because 2FA endpoint also shares the rate limit and was vulnerable. The same vulnerability was also present in the password validation endpoint.”
The vulnerability was reported to Apple on July 1, 2020, and a patch was rolled out in April 2021. The researcher claimed Apple did not notify him when it fixed the issue.
Furthermore, the tech giant told him that only “a very small minority of accounts were ever at risk, and extremely few Apple device users were vulnerable.”
“This attack only works against Apple ID accounts that have never been used to log in on a password protected iPhone, iPad, or Mac,” the company said, downplaying the researcher’s assessment that all iCloud accounts would be at risk.
According to Muthiyah, the company attempted to hide the fact that the vulnerability was critical and even changed a related support page. He believes the change was made in October 2020, following his inquiry on the vulnerability.
The researcher even discussed the issue directly with Apple’s security engineers, who told him that passcodes are verified on the device itself, and not sent to the company’s servers, but the passcode validation endpoint had rate limits in place that could not be bypassed, thus preventing the attack. However, Muthiyah believes that the endpoint was vulnerable before his report, and was patched in the meantime.
“If they did patch it after my report, the vulnerability became a lot more severe than what I initially thought. Through brute forcing the passcode, we [would] be able to identify the correct passcode by differentiating the responses. So we not only can take over any iCloud account but also discover the passcode of the Apple device associated with it. Even though the attack is complex, this vulnerability could hack any iPhone / iPad that has a 4 digit / 6 digit numeric passcode if my assumption is right,” he says.
The functionality, however, is currently not vulnerable and the researcher’s claims cannot be verified.
Apple offered the researcher an $18,000 bug bounty reward, but he refused it, saying that the company significantly downplayed the impact of the flaw, and that it should have awarded him $100,000 or even as much as $350,0000.
Related: Apple Patches macOS Security Bypass Vulnerability Exploited by ‘Shlayer’ Malware