# New AppPassword can be generated without password confirmation

OCS endpoint /ocs/v2.php/core/getapppassword returns a fresh app password without the password-confirmation check, bypassing the re-auth gate on app password creation.

- Payout: $250
- Severity: high
- Program: Nextcloud
- Found by: mikaelgundersen
- Disclosed: 2023-08-10
- CVE: CVE-2023-39963
- Write-up quality: 6/10
- Original: https://hackerone.com/reports/2067572
- Library page: https://bugbountylibrary.com/r/h1%3A2067572
- Tags: area:web domain:web impact:ato kind:bounty platform:hackerone sev:high tech:rest technique:legacy-endpoint technique:source-review vuln:access-control vuln:auth-bypass

**Target:** Nextcloud server OCS API endpoint core/getapppassword
**Root cause:** The password-confirmation protection is enforced only in AuthSettingsController::create (settings app) but the OCS core getapppassword route issues app passwords without requiring recent password confirmation.
**Steps:**
1. Authenticate to a Nextcloud instance (or use an unlocked session).
2. Send `GET https://SERVER/ocs/v2.php/core/getapppassword` with session cookies.
3. Receive a new app password in the response without any password re-entry prompt.
**How found:** Reporter read AuthSettingsController.php line 122 noting the password-confirmation gate on app password creation, then looked for alternate routes that generate app passwords and found the OCS core/getapppassword endpoint lacking that check.
**Exploitation:** Attacker with access to an unlocked/authenticated session (e.g. unattended workstation) calls the OCS endpoint to mint a persistent app password, retaining access after the session ends, without triggering the password-confirmation prompt.
**Insight:** When a sensitive action is gated by re-auth in one controller, enumerate all other routes/APIs (especially OCS/legacy endpoints) that perform the same action—gates are often enforced per-controller, not per-capability.

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

**GET request to obtain app password without confirmation**

````
```https://SERVER/ocs/v2.php/core/getapppassword```
````

