Summary
Rote's OAuth bind/merge endpoint may let an authenticated user link an existing OAuth-bound account to their own account without authorization to do so. If the endpoint accepts attacker-supplied account and provider identifiers without verifying ownership, the attacker could take over the victim's account and access or delete its data.
Affected context
The issue is described in Rote versions 1.2.0 through 2.6.0 and involves the OAuth bind/merge endpoint. It becomes risky when the endpoint relies on a caller-provided existing account ID and GitHub or Apple user ID without confirming that the authenticated user is authorized to merge that account.
Exploit preconditions
- Attack surface: The OAuth bind/merge endpoint
- Required access: An authenticated Rote account
- Trigger point: An account merge request containing an existing account ID and a GitHub or Apple user ID
- Why exploitation is possible: The endpoint may not enforce ownership or authorization checks for the account being merged
Why this happens
This is an authorization flaw involving a user-controlled identifier. CWE-639 describes authorization bypass through a user-controlled key: an application uses an identifier supplied by the caller to select an account or object without adequately checking whether that caller may access it. In this case, insufficient ownership validation during OAuth account merging can allow one user to associate another user's account with their own.
Potential impact
- An attacker could take over a victim's account
- Notes and attachments could be accessed, altered, or deleted
- API keys associated with the account could be exposed or misused
- The victim account could be deleted as part of the merge
General mitigation guidance
Defensive patterns focus on enforcing authorization at the point of account linking and minimizing trust in client-supplied identifiers. Common approaches include:
- Deriving the acting user's identity from the authenticated server-side session
- Verifying ownership of both accounts before allowing a merge
- Validating OAuth identities through trusted provider responses rather than relying on submitted identifiers alone
- Applying explicit, auditable authorization checks to every account merge
- Limiting the permissions and lifetime of API keys, and requiring appropriate protections for sensitive account changes
How teams detect issues like this
Review account-linking and merge flows for authorization checks that depend on caller-supplied account IDs or provider identities. Static analysis and code review can look for object lookups using request parameters that are not followed by ownership checks. Monitoring can flag unexpected account merges, changes in linked OAuth identities, API-key access, or account deletions; policy checks can require explicit authorization tests for sensitive account operations.

