Arbitrary file write triggered by deeplink abuse - MetaMask Android
The MetaMask Android app allowed a deeplink to open its in-app browser and start downloading an attacker-supplied file straight away, with no confirmation prompt. An attacker could therefore write arbitrary files to the victim's device without the user being aware until the download had already happened.
Originally disclosed on HackerOne
- Triaged in 2 days
- Fixed in 5 months
- Paid in 5 days
- Disclosed after 8 months
Summary by the program
@renekroka and @hackerontwowheels from the UGWST team have found a vulnerability in the MetaMask Android app that allows for arbitrary files to be written to disk.
The team demonstrated how attackers can deeplink into MetaMask's in-app browser, and trigger the immediate download of an attacker supplied file. Due to a lack of confirmation prompts, users are not made aware that a download has occurred until after the payload has been downloaded.
The MetaMask team would like to once again thank @renekroka and @hackerontwowheels for their excellent find, and for helping make MetaMask more secure.
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 the in-app browser accepted a deeplink that triggered a file download without any user confirmation step.
What the attacker needed
Victim opens a crafted deeplink; MetaMask Android app installed
How it was found
- Craft a deeplink that opens MetaMask's in-app browser.
- Point that deeplink at an attacker-supplied file so a download starts immediately.
- The file is downloaded before the user is made aware of it.
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.
A deeplink is a special link that opens a specific screen inside an app instead of a web page. Here, a crafted link opened MetaMask's built-in browser and made it download a file chosen by the attacker. Because the app did not ask the user to confirm, the file landed on the phone before the person realised anything had happened.
What is Mobile?
Flaws specific to Android and iOS apps: exported components, deep links, WebViews and data left on the device.