Combination of content provider allows private data disclosure
The Nextcloud Android app exposes a content provider that reveals file metadata, including filenames and paths, and another content provider that can generate and serve thumbnails of those files. A malicious app on the same device can combine these to disclose private pictures and text files.
- Paid in 3 months
- Disclosed after 4 months
Good afternoon.
Sorry, its me again .. I use NC on a daily basis so I often makes some checks ..
As per #489105, document thumbnail shall not be disclosed. The exposure on thumbnailCache/ is an already know issue. However, malicious apps are still able to extract (at least) pictures and text files by combining two content provider results.
As discussed in #518669, file status is exposed. This allow basically any app to retreive NC storage file structures. The following endpoint is the relevant one for current issue:
adb shell content query --uri content://org.nextcloud/file
which output for instance
By using the output from this content provider query, it is possible to force the DiskLruImageCacheFileProvider content provider to generate thumbnail of the assets adb shell content read --uri content://org.nextcloud.imageCache.provider/1553357105332.jpg
Impact
User data is exposed to partial disclosure (thumbnail).
As far as I understand, DiskLruImageCacheFileProvider shall not be exported
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 DiskLruImageCacheFileProvider and the file metadata content provider were exported without proper access controls, allowing any app to query them.
Impact
A malicious app on the same device could partially disclose user data by retrieving thumbnails of pictures and text files.
What the attacker needed
Malicious app installed on the same device
The fix
The DiskLruImageCacheFileProvider should not be exported.
How it was found
- Query the file content provider to obtain file metadata such as filename and path.
- Use the obtained filename to request a thumbnail from the image cache content provider.
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.
On Android, apps can share data with other apps through components called content providers. This report shows that the Nextcloud app left two such components open, so any other app on the phone could read the list of files and then fetch small preview images of them, leaking private content.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.