# Notification implicit PendingIntent in com.nextcloud.client allows to access contacts

Implicit PendingIntent in Nextcloud download notification let a NotificationListener app mutate packageName/clipData and inherit Nextcloud's contacts permission to read contacts and logs.

- Payout: $250
- Severity: low
- Program: Nextcloud
- Found by: imnotyouaa_test
- Disclosed: 2022-05-27
- CVE: CVE-2022-24886
- Write-up quality: 7/10
- Original: https://hackerone.com/reports/1161401
- Library page: https://bugbountylibrary.com/r/h1%3A1161401
- Tags: area:mobile domain:mobile impact:pii-leak impact:privesc kind:bounty platform:hackerone sev:low tech:android technique:chained vuln:access-control vuln:info-disclosure

**Target:** Android app com.nextcloud.client download notification PendingIntent
**Root cause:** FileDownloader.notifyDownloadResult built an implicit PendingIntent (no explicit component, no FLAG_IMMUTABLE), so a NotificationListener could retrieve and mutate it, redirecting it to attacker-controlled package with clipData.
**Steps:**
1. Install poc.apk and grant BIND_NOTIFICATION_LISTENER_SERVICE via the button
2. Install com.nextcloud.client 3.15.1 and grant contacts permission
3. Download a file in Nextcloud to trigger the 'Downloaded' notification
4. Malicious app grabs the implicit PendingIntent from the notification and sets `packageName` and `clipData` to its own component
5. PendingIntent executes with Nextcloud's UID, reading contacts; also read log files via fileprovider path config
6. Observe stolen contacts via `adb logcat | grep sbn`
**How found:** Researcher inspected notification construction in FileDownloader.notifyDownloadResult, noticed the PendingIntent was implicit, and reasoned a NotificationListener could retrieve and mutate it to inherit the app's permissions.
**Exploitation:** Attacker app with notification-listener access intercepts the implicit PendingIntent from the download notification, rewrites its packageName/clipData to point at attacker code, and the intent fires under Nextcloud's identity, granting contacts read and fileprovider log access without requesting those permissions.
**Escalation:** Chained implicit PendingIntent hijack with over-broad fileprovider path config to also read app-directory log files.
**Insight:** On Android, any PendingIntent placed in a notification is retrievable by NotificationListener services; check whether it is implicit and mutable, then test rewriting packageName/clipData to redirect it to your own component under the victim's UID.

