Bypassing lock protection
The Nextcloud Android app's lock screen could be bypassed by sending a crafted intent that adds a new account, after which the app opened without the lock check and allowed access to other accounts' data. An attacker could then view, alter, or upload data from those accounts.
- Paid in 5 months
- Disclosed after 6 months
Nextcloud allows multi account within the android client app and relies on a single lock
Based on the (exposed) intent nc://login, it is possible to add a new account under attacker domain and open the Nextcloud without the lock check.
Proof of concept
- open the NC app with the lock displayed
- triggers the following intent
adb shell am start -a android.intent.action.VIEW -d "nc://login/server:MY_SERVER&user:ME&password:PWD --es "ACCOUNT" "not_valid" 3. if the "add an account" action fails, attacker can still add an account in the screen
the app opens and attacker can check other accounts installed on the app.
Remark
note that the "adb shell" comamnds could also be trigger with an app, making adb access not required the "--es" option is required to prevent an app crash on
AuthenticatorActivity.java:303
mAccount = getIntent().getExtras().getParcelable(EXTRA_ACCOUNT);
Impact
Lock can be removed and then data can be retrieved / alter / uploaded
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 app trusted an externally reachable intent to add an account and did not re-check the lock before showing the account list.
Impact
The lock could be removed and data from other accounts could be retrieved, altered, or uploaded.
What the attacker needed
Nextcloud Android app with lock enabled; ability to send an intent to the app; no adb required if an app sends the intent
How it was found
- Open the Nextcloud app so the lock screen is shown.
- Send the login intent with an account extra to add an account.
- If adding the account fails, add an account manually on the screen that opens.
- The app opens without the lock and other accounts can be checked.
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.
The Nextcloud app can hold several accounts and uses one lock screen to protect them all. By sending a special message (an intent) to the app, someone could make it add a new account and skip the lock, then look at the other accounts already on the phone. This means the lock did not really protect the data.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.