Extract full photos/videos database from any locked Google Pixel phone
A vulnerability in Android's USB accessory mode allowed an attacker with physical access to a locked Pixel phone to bypass the 'No data transfer' setting and extract the entire photo and video library, including trashed items, by inducing connection instability that caused the phone to switch to PTP mode. The issue affected all Android devices with Google Play Services and Android Auto preinstalled.
I emailed the “duplicate report finder”. He confirmed that his report mentioned device extraction too and even though it was rated high quality, he only received a normal bounty too, because device extraction refers to extracting data STORED by titan m2, not data PROTECTED by titan m2 (user data) as per the rule page.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the USB service starts accessory mode without checking if the device is locked or if the user has set 'No data transfer', and when the connection is unstable, it falls back to PTP mode, allowing photo access.
Impact
An attacker with physical access could extract the entire photo and video library from a locked device, bypassing the lock screen; the exploit required connection instability and was later considered intended behavior by Google, but a fix was released.
What the attacker needed
Physical access to the locked device; a computer with DHU Emulator; ability to repeatedly connect/disconnect
The fix
The fix was released in the November patch and adds a check in UsbDeviceManager.java to handle accessory mode exit, but it does not disable accessory mode on the lock screen as the reporter suggested.
How it was found
- Connect the locked phone to a computer running the DHU Emulator (which acts as an Android Auto head unit).
- Repeatedly quit and reopen the DHU Emulator to create connection instability.
- The phone reconnects multiple times and eventually enters PTP mode.
- Access and download all photos and videos, including those in the trash, with original metadata.
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 write-up has not been written yet. The Original tab links to the source.
When you plug a phone into a computer or car, it can enter different USB modes. One mode, called PTP, lets you copy photos. Normally, the phone only enters this mode if you unlock it and choose it. But this bug let a device trick the phone into entering PTP mode even while locked, so someone could copy all your photos without your password.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.