MX Player Sender/Receiver Relationship
The MX Player file-sharing feature concatenated a user-supplied filename onto a hardcoded directory without sanitising path traversal sequences, allowing an attacker to write files anywhere the app had permission. By writing a crafted native library to a location the app loads at startup, an attacker could achieve code execution on some devices.
medium.com
Published on medium.com
MX Player is an Android App that you can find on the Google Play Store, having over 500M downloads.
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
Impact
An attacker within Bluetooth range could write arbitrary files to the app's private storage and, on certain devices, achieve code execution when the app is next launched.
What the attacker needed
Attacker within Bluetooth range; receiver phone in hotspot mode; app version before 1.24.5; certain device architectures
The fix
The path traversal issue was fixed in version 1.24.5.
How it was found
- Put the receiver phone into hotspot mode so it accepts MX Player transfers.
- Connect to the receiver and send a FILE_LIST protocol message with a name containing path traversal sequences.
- Send a second FILE_LIST message to drop an empty .vdex file alongside the .odex file.
- Run the app again so it loads the planted .odex file as native code.
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 an app saves a file, it should keep it inside its own folder. Here, the app trusted the filename sent by the other phone and did not check for '..' sequences, which mean 'go up a folder'. That let an attacker place a file in a sensitive location, and on some phones the app later ran that file as code.
What is Path traversal?
Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.