# OAuth Consent Phishing > OAuth consent phishing gets a malicious or attacker-controlled OAuth application authorized against a victim's cloud identity. That app then holds delegated tokens that survive password resets and MFA enrollment, giving persistent access through the authorization layer rather than the login. ## How it works Attacks have shifted from stealing credentials to stealing or obtaining **OAuth grants**. A grant gives an application delegated scopes (mail, files, directory) through access and refresh tokens. Because the grant sits at the authorization layer *after* authentication, it isn't touched by password changes or MFA re-enrollment, and its activity doesn't trigger credential-based alerts ([[raw/unit42.paloaltonetworks.com/the-current-landscape-of-oauth-attacks-12366|Unit 42]]). Ways in: - **Illicit consent**: a third-party app with a lookalike name or publisher (for example a homoglyph "0" for "O" in a Microsoft-like app name) asks the user to "Accept" broad scopes ([[raw/wiz.io/would-you-click-accept-automatically-detecting-malicious-azure-oauth-a-8970|Wiz]]). - **Second-party (internal) apps after compromise**: with one compromised account, the attacker registers an app *inside* the tenant, grants it scopes such as `Mail.Read` and `offline_access`, and mints a secret. This can be fully automated, and access survives credential reset ([[raw/proofpoint.com/beyond-credentials-weaponizing-oauth-applications-for-persistent-cloud-6502|Proofpoint]]). - **Code theft by social engineering**: "ConsentFix" tricks users into dragging or pasting an Entra authorization code. The attacker redeems it at the token endpoint within its short validity window, with no password and no MFA prompt ([[raw/obsidiansecurity.com/token-based-attacks-how-attackers-bypass-mfa-4363|Obsidian]]). - **Compromise of a legitimate integration**: when a trusted SaaS app's token store or credentials are breached, every customer grant becomes the attacker's. Broad "Allow All" grants make this a supply-chain path ([[raw/wiz.io/context-ai-oauth-token-compromise-8804|Wiz]]). - **Flow-binding bugs in connectors**: Unit 42 describes Cross-User OAuth Session Fixation (COSF). An attacker-started "Connect your X" flow is completed in the victim's context without being bound to the initiating user, leaving a long-lived token as a backdoor. It also describes cross-tenant client ID confusion ([[raw/unit42.paloaltonetworks.com/the-current-landscape-of-oauth-attacks-12366|Unit 42]]). ## What to check - [ ] Tenant consent policy: can end users consent to unverified, multi-tenant apps? Which scopes need admin approval? - [ ] Inventory service principals and app registrations. For each, check: - [ ] publisher verification - [ ] homepage, and owner domain matching the claimed vendor - [ ] whether reply URLs point at unrelated infrastructure - [ ] whether high-risk scopes are granted (mail, files, `offline_access`, directory write) ([[raw/wiz.io/would-you-click-accept-automatically-detecting-malicious-azure-oauth-a-8970|Wiz]]) - [ ] New internal app registrations, credential (secret or cert) additions and consent grants made by ordinary user accounts, especially soon after a risky sign-in ([[raw/proofpoint.com/beyond-credentials-weaponizing-oauth-applications-for-persistent-cloud-6502|Proofpoint]]). - [ ] Third-party AI and productivity tools holding broad Workspace or M365 grants ([[raw/wiz.io/context-ai-oauth-token-compromise-8804|Wiz]]). - [ ] Incident response: does the password-reset or compromise playbook also revoke OAuth grants and refresh tokens, and remove attacker-created apps? - [ ] For apps that broker "connect your account" flows: is the OAuth callback bound to the initiating user and session? ## Notable cases - **Context.ai to Vercel (April 2026)**: OAuth tokens for Context.ai consumer users were compromised (possibly via an infostealer on an employee). A Vercel employee's broad grant gave access to Vercel's Google Workspace, a double supply-chain incident ([[raw/wiz.io/context-ai-oauth-token-compromise-8804|Wiz]]). - **Homoglyph Azure apps**: a "0"-for-"O" Microsoft lookalike app led Wiz to three campaigns affecting more than 20 companies. Wiz built OAuth Apps Scout to flag such deviations ([[raw/wiz.io/would-you-click-accept-automatically-detecting-malicious-azure-oauth-a-8970|Wiz]]). - **Proofpoint second-party app tooling**: automated registration, secret generation and token harvesting for persistence. Proofpoint reports threat actors already use the technique ([[raw/proofpoint.com/beyond-credentials-weaponizing-oauth-applications-for-persistent-cloud-6502|Proofpoint]]). ## Defenses - Disable end-user consent for unverified apps or apps with vague or impersonating names, and route requests through admin approval ([[raw/unit42.paloaltonetworks.com/the-current-landscape-of-oauth-attacks-12366|Unit 42]]). - Restrict who can register applications and add credentials. Alert on new app registrations, consents and secrets ([[raw/proofpoint.com/beyond-credentials-weaponizing-oauth-applications-for-persistent-cloud-6502|Proofpoint]]). - Continuously audit apps against a baseline (publisher verification, homepage, owner domain, reply URLs, scopes) ([[raw/wiz.io/would-you-click-accept-automatically-detecting-malicious-azure-oauth-a-8970|Wiz]]). Audit registered `redirect_uri` values ([[raw/unit42.paloaltonetworks.com/the-current-landscape-of-oauth-attacks-12366|Unit 42]]). - Grant least-privilege scopes to third-party integrations and review them periodically. On a vendor compromise, revoke grants and rotate credentials ([[raw/wiz.io/context-ai-oauth-token-compromise-8804|Wiz]]). - Make compromise remediation revoke grants and refresh tokens, not just reset the password ([[raw/obsidiansecurity.com/token-based-attacks-how-attackers-bypass-mfa-4363|Obsidian]]). - Monitor for authorization-code copy and paste flows ([[raw/unit42.paloaltonetworks.com/the-current-landscape-of-oauth-attacks-12366|Unit 42]]). ## Related - [[Authentication Security]] · [[OAuth 2.0 Vulnerabilities]] · [[Device Code Phishing]] · [[Adversary-in-the-Middle Phishing]] · [[Account Takeover]] - [[Authorization Security]] · [[Software Supply Chain Security]] · [[AI and LLM Security]] · [[JSON Web Tokens]] ## Sources - [[raw/proofpoint.com/beyond-credentials-weaponizing-oauth-applications-for-persistent-cloud-6502|Beyond credentials: weaponizing OAuth applications for persistent cloud access - Proofpoint US]] - [[raw/wiz.io/would-you-click-accept-automatically-detecting-malicious-azure-oauth-a-8970|Would You Click ‘Accept’? Automatically detecting malicious Azure OAuth applications using LLMs]] - [[raw/unit42.paloaltonetworks.com/the-current-landscape-of-oauth-attacks-12366|The Current Landscape of OAuth Attacks]] - [[raw/wiz.io/context-ai-oauth-token-compromise-8804|Context.ai OAuth Token Compromise]] - [[raw/obsidiansecurity.com/token-based-attacks-how-attackers-bypass-mfa-4363|Token-Based Attacks: How Attackers Bypass MFA]] - [[raw/wiz.io/3-oauth-ttps-seen-this-month-and-how-to-detect-them-with-entra-id-logs-9110|3 OAuth TTPs Seen This Month — and How to Detect Them with Entra ID Logs]]