Just over a month after researchers demonstrated that hackers can hijack mouse clicks on a Mac, a new report indicates that specially crafted web pages can freeze or crash Macs and iPhones.
Security researcher Sabri Haddouche has created HTML and CSS code that, when hosted by a web page, attacks visitors' devices. His tweet contains a link to such web page, which you can click if you want to try it for yourself (but don't say we didn't warn you).
"The attack uses a weakness in the -webkit-backdrop-filter CSS property," Haddouche told BleepingComputer. "By using nested divs with that property, we can quickly consume all graphic resources and crash or freeze the OS."
In other words, while the code is just 15 lines long, it contains a massive amount of <div> tags, which consume all of your device's graphic resources, causing it to freeze or restart.
Bleeping Computer made its own video illustrating the attack on an iPhone:
Haddouche went on to note that the attack affects all browsers on iOS, as well as Safari and Mail in macOS.
"All browsers on iOS are affected because the underlying rendering engine is WebKit," Haddouche explained.
Visiting the webpage on a Mac will cause Mail and Safari to freeze for a second, and the computer running them to slow down. (Once you've closed the Safari tab running the code, the computer returns to normal).
It caused a device running iOS 12 to reboot completely, but caused an iOS 11.4.1 device to only respring (boot the user to the lock screen). According to Twitter user Robert Petersen, the web page causes an Apple Watch running watchOS 5 to freeze and reboot as well.
Many Mac users still assume Macs aren't vulnerable to malware and adware, but the truth is that the past two years have seen more Mac vulnerabilities than ever before.
Just a few weeks ago, North Korean state-sponsored hackers used Mac malware to successfully hack a cryptocurrency exchange platform. And back in January, a researcher discovered a piece of macOS malware that reroutes your traffic to malicious websites, and could also be used to steal passwords, take screenshots, download files, run software and more.
Unfortunately, there isn't much you can do to prevent these attacks. We'll just have to wait for Apple to release a patch. In the meantime, take extra care not to click on links that you're not familiar with.