# Android content provider exposes password-protected share password hashes

Exported Android content provider in Nextcloud app leaks bcrypt hashes and share tokens for password-protected shares, enabling offline cracking and share access.

- Payout: $75
- Severity: low
- Program: Nextcloud
- Found by: netranger
- Disclosed: 2020-01-31
- Write-up quality: 6/10
- Original: https://hackerone.com/reports/242727
- Library page: https://bugbountylibrary.com/r/h1%3A242727
- Tags: area:mobile domain:mobile impact:data-leak kind:bounty platform:hackerone sev:low tech:android technique:source-review vuln:access-control vuln:info-disclosure vuln:secrets-leak

**Target:** Nextcloud Android app FileContentProvider (content://org.nextcloud/shares)
**Root cause:** FileContentProvider declared exported=true in AndroidManifest.xml, so any app on the device can query it; it stores bcrypt share password hashes and share tokens locally.
**Steps:**
1. Install Nextcloud Android app v1.4.3, sign in, create password-protected shares.
2. Enable USB debugging, run `adb shell`.
3. Run `content query --uri content://org.nextcloud/shares`.
4. Read `share_with` (bcrypt hash) and `token` fields from output.
5. Alternatively install Content Provider Helper, add `org.nextcloud/shares`, tap Query.
6. Crack hash offline; combine with token to access share.
**How found:** Researcher inspected AndroidManifest.xml, noticed FileContentProvider exported=true, then queried it via adb `content` command and Content Provider Helper app to confirm data exposure.
**Exploitation:** Malicious app on same device queries content://org.nextcloud/shares to exfiltrate bcrypt hashes and share tokens, cracks hashes offline (bypassing server brute-force protections), then uses token+password to access protected share.
**Insight:** On Android targets, grep the manifest for `android:exported="true"` on providers/services/receivers and query each authority with `content query --uri content://<authority>/<path>`; local caches of server-side secrets (hashes, tokens) are high-value even when the server enforces protections.

## Proof of concept (copied exactly from the original report)

**adb content query of shares provider**

```
content query --uri content://org.nextcloud/shares
```

