Bypassing App Lock [Firefox Lockwise - iOS]
The app lock feature in Firefox Lockwise for iOS relies on the device's wall-clock time to decide whether to prompt for Face/Touch ID after an inactivity timeout. By setting the device time backwards, an attacker can reopen the app without any unlock prompt and access all stored passwords.
- Fixed in 6 months
- Paid in 6 months
- Disclosed after 6 months
Platform affected:
===
- App name: Firefox Lockwise
- App version: 1.7.3 (latest)
- OS: iOS (Tested environment: iOS 13.6)
- App Store URL: https://apps.apple.com/us/app/firefox-lockwise/id1314000270
Description:
===
Lockwise app "App Lock" feature allows the user to lock the app using Face / Touch ID. The "Auto Lock" timeout feature will lock the app automatically after user specified duration.
I set the timeout to "1 minute", so the app will lock automatically after 1 minute of inactivity (after I close the app). When I reopen the app after 1 minute or later, it prompts me to unlock before accessing the app.
But this feature does not work as intended. After 1 minute or LATER, if I change the device time to 1 hour backward and reopen the app, it allows me to access the app completely without unlocking (the app fails to prompt me to unlock).
NOTE: This issue also occurs if I change the device date to 1 day backward.
Impact:
===
An attacker can access all the passwords stored in the Lockwise app without unlocking the app lock by just reversing device date or time.
Steps to reproduce:
===
NOTE: PoC video attached.
1. Install the Lockwise app.
2. Open the app and login your account.
3. Go to Settings, set "Auto Lock" to "1 Minute" (you can also select any other duration).
4. Close the app.
5. After 1 minute or LATER, change the device time to 1 hour backward (or) change the device date to 1 day backward.
6. Now reopen the app (Now the app will not prompt to unlock and you can access the app completely).
Fix
===
The "Auto lock" feature works in this logic:
Lockwise app stores the app closed time (timestamp) when user closes the app. When user reopens the app, it compares current device time with the app closed time. If the difference is greater than (>) user specified duration (For example: 1 minute), then it will prompt the user to unlock.
If attacker changes the device time to app closed time / any earlier time and reopens the app, it fails to prompt to unlock because the current device time will be same / earlier than the app closed time.
The problem is using [NSDate().timeIntervalSince1970] (current time). Use [ProcessInfo.systemUptime] (device up time) for time interval calculation.
-> [NSDate().timeIntervalSince1970] - Returns current time in milliseconds.
-> [ProcessInfo.systemUptime] - Returns the amount of time the system has been awake since the last time it was restarted.
https://developer.apple.com/documentation/foundation/processinfo/1414553-systemuptime
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
The app uses the device's wall-clock time (NSDate) instead of a monotonic clock (system uptime) to calculate the elapsed time since the app was closed, so changing the device time defeats the lock.
Impact
An attacker with access to the unlocked device can read all passwords stored in Lockwise without knowing the app lock credentials, simply by changing the device time.
What the attacker needed
Physical access to the unlocked device; ability to change device time; app lock enabled with a timeout
The fix
The app should calculate elapsed time using a monotonic source such as system uptime instead of the device's wall-clock time.
How it was found
- Install the Lockwise app and log in.
- Set the Auto Lock timeout to 1 minute in Settings.
- Close the app and wait at least 1 minute.
- Change the device time backwards by 1 hour (or the date by 1 day).
- Reopen the app; it does not prompt for unlock and grants full access.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
Firefox Lockwise is a password manager that can lock itself after a set time, asking for your fingerprint or face to reopen. The app checks how long it has been closed by comparing the current clock time with the time it was closed. If you move your phone's clock backwards, the app thinks no time has passed and lets you straight in, so anyone holding your unlocked phone can read your saved passwords.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.