# OAuth login or account-linking confusion

An authorization response or external identity is bound to the wrong application session or controlled account.

**Candidate CWE:** [CWE-287](https://cwe.mitre.org/data/definitions/287.html) · [CWE-352](https://cwe.mitre.org/data/definitions/352.html)

## Test hypothesis

Use separate A/B browser profiles and a test IdP. Capture a normal linking flow, then submit A’s response into B’s pending transaction. Test code reuse and wrong PKCE verifier as separate controls.

## Evidence required

The application logs in or links the wrong controlled identity without required confirmation. Preserve issuer, client, subject, redirect, transaction binding, and the final linked identity.

## Rule out false positives

Missing state alone is inconclusive when valid alternative binding exists. A rejected mismatched response or public redirect does not prove takeover.

## Playbook and command references

- [Authentication, recovery, federation, and session lifecycle](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/modules/identity-session.html) — Test registration, recovery, identity changes, invitations, SSO enforcement, and deprovisioning as one account state machine.
- [OAuth, OIDC, and SAML: transaction binding and token trust](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/modules/federation-token-trust.html) — Separate browser transaction binding, issuer trust, token purpose, and identity linking using controlled federation fixtures.

[Find the associated command snippets](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/commands.html?q=Authentication%2C%20recovery%2C%20federation%2C%20and%20session%20lifecycle)

## Referenced by these target playbooks

[Web & API](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/web-api.html) · [OSS & self-hosted](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/oss.html) · [Mobile](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/mobile.html) · [Desktop & extensions](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/desktop.html) · [Cloud & containers](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/cloud.html) · [AI, agents & MCP](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/ai.html)

## Report checklist

- [ ] Capture the affected version, configuration, identities, and object ownership.
- [ ] Preserve a valid baseline and a negative control.
- [ ] Reproduce the forbidden data access, action, or state change on controlled fixtures.
- [ ] Explain the intended security rule and why the observed behavior violates it.
- [ ] State prerequisites, uncertainty, cleanup, and the smallest demonstrated impact.

## Conditional ATT&CK mapping

No direct ATT&CK mapping selected. Record the weakness and demonstrated impact without forcing an adversary-behavior classification. See the [mapping guide](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/attack.html).

## Primary references

- [OAuth 2.0 security BCP](https://www.rfc-editor.org/rfc/rfc9700.html)

[Back to the complete vulnerability catalog](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/vulnerabilities.html)
