Researchers have found a bug that can be used to bypass Apple’s Activation Lock feature and gain access to the homescreen of locked iPhones and iPads running the latest version of iOS.

There seem to be at least two variations of the vulnerability – one of them works on iOS 10.1 and the second has also been reproduced on the latest 10.1.1 version of Apple’s mobile operating system.

The Find My iPhone service allows users to activate Lost Mode on their iPhone, iPad or iPod if the device is lost or stolen. When Lost Mode is used, it automatically enables Activation Lock, a feature that prevents reactivation of the device without the legitimate owner’s permission.

When a locked device is started, users are prompted to connect to a Wi-Fi network. If the “Other Network” option is selected, the user must enter the name of the network and choose a security protocol (e.g. WEP, WPA2, etc.). Depending on which protocol is selected, a username and/or a password must also be entered.

The problem, as researchers discovered, is that there is no limitation on the number of characters that can be entered into the name, username and password fields. By entering very long strings into these fields, an attacker can trigger a crash that exposes the device’s homescreen.

The crash can be triggered using at least two methods. The first involves Apple’s iPad smart cases, which cause the device to wake or sleep when the case is opened or closed.

The flaw was first discovered by India-based security enthusiast Hemant Joseph, who started analyzing the Activation Lock feature after purchasing a locked iPad from eBay. He managed to trigger the crash that gave him access to the homescreen by closing and opening the smart case.

This method worked on iOS 10.1, but the bug was addressed in iOS 10.1.1, which Apple released on October 31.

Researchers at Vulnerability Lab also analyzed the issue and discovered that it can be reproduced on iOS 10.1.1 using the screen rotation feature and Night Shift mode. In the video published by Vulnerability Lab, the homescreen is only visible for a second, but the company’s founder, Benjamin Kunz-Mejri, told SecurityWeek that access can be maintained by quickly pressing the power button.

The videos published by Vulnerability Lab and Joseph show how the bug is triggered on an iPad, but Kunz-Mejri said the bug affects iPhones as well.

SecurityWeek has reached out to Apple for comment and will update this article if the company responds.

Related: iOS Lockscreen Bypass Gives Access to Contacts, Photos

Related: iPhone 6s Lockscreen Bypass Allows Access to Photos, Contacts