Curious websites can obtain a (cryptographically) unique identifier about the used Android device.
Firefox on Android exposes a Widevine DRM license request to any website that plays DRM content, and that request contains a per-device unique public key plus device details. A website could use this identifier to track users across visits and gather information about their device.
Originally disclosed on Mozilla
- Fixed in 21 days
- Paid in 26 days
- Disclosed after 21 days
Created attachment 9303890 figures.zip
Dear Firefox Team, ** figures are in the attached files **
We would like to report a privacy issue that allows any “curious” website to obtain a (cryptographically) unique identifier about the used Android device.
Impacted environment: Android devices
Main impact on users: websites can track users with the obtained unique identifier. No data is required to be stored on users’ devices.
Other impacts: the websites can also obtain various information about the user:
• Device name, hardware architecture, and its build version of Android. • The Widevine version and its build. • Hash of package certificate.
Complexity of the attack: easy (a few Javascript calls)
Who can perform: any website that is allowed to play DRM-controlled content.
(By default, when a website attempts to play a DRM-protected content for the first time (e.g., a video), Firefox always asks the user for explicit permission by displaying the following message: Allow <URL> to play DRM-controlled content? With two buttons “Don’t allow” and “Allow” with “Allow” pre-selected. This message is only displayed once per origin if the user selects the button ‘Allow’, since the answer is remembered). See Fig 1.
Tested environment: Firefox apk (not Desktop version): both normal browsing and private browsing
106.1.0 (Build #2015909131), 71ca6c1f7+ AC: 106.0.5, 5f06485fc3 GV: 106.0-20221010181815 AS: 94.2.1
Remarks:
• Chrome is NOT vulnerable to this “privacy” issue. • Even when “Enhanced Tracking Protection: strict” is chosen, the attack still works.
Exploited Firefox modules:
• Widevine integration for the W3C standard EME (Encrypted Media Extensions) protocol Ref: https://www.w3.org/TR/encrypted-media/
Required steps to perform (with Javascript):
• First, the “curious” website initializes the DRM engine. • Then, it asks the client (the user device) to generate a (DRM) license request. • Finally, it collects and parses the license request. The license request includes various information. Refer to fig 2 for an example. Please note that the Widevine inner protocol is designed to have the “publickey” field unique per Android device.
How can you see the data without writing any code
Widevine provides a website to help developers integrating their DRM solution. We illustrate this privacy issue by using it. However, any website can use the EME JS API supported by Firefox to get the same results. To reproduce our screenshots, do as follows: • Go to integration.widevine.com/player • Click on the button play next • Allow the DRM-controlled content to be played. • Click on the button “R0” or “R1”.
Mitigation:
Activate the privacy mode. This follows the EME recommendation in privacy (https://www.w3.org/TR/encrypted-media/#privacy) section 11.4. Indeed, Widevine defines a mode where the generated license request can be only parsed by the license server (e.g., the Widevine License Server). In this mode, Widevine encrypts the request with some public key that only the License server has the corresponding private key. Thus, the curious “website” will not be able to obtain any valuable information from the request. Chrome leverages this privacy mode. Refer to fig 3 to see that the request (especially the client ID) is not intelligible to us, as it is encrypted.
How to implement the mitigation:
Following the Chrome (decompiled) apk code, just add the following line setPropertyString('privacyMode', 'enable'); // called from the MediaDrm Android class
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
Likely Firefox's Widevine integration does not enable Widevine's privacy mode, so the licence request is returned in a form the calling website can read, including a device-unique public key.
Impact
Websites could track users via the unique identifier and also learn device name, architecture, Android build, Widevine version and package certificate hash; the attack still works with strict Enhanced Tracking Protection and in private browsing.
What the attacker needed
Android device running Firefox; victim allows DRM content for the site; site plays DRM-protected media
The fix
Firefox should enable Widevine's privacy mode so the licence request is encrypted to the licence server and unreadable by the website.
How it was found
- Open the Widevine integration player page.
- Start playback with the play button.
- Allow DRM-controlled content when Firefox prompts.
- Click the R0 or R1 button to view the licence request.
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.
When a site plays protected video, the browser asks the phone's DRM system for a licence. In Firefox on Android, that request includes a value that is different for every phone, so a site can recognise the same phone again later. That lets sites follow you around even without cookies.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.