OAuth redirect leakage is the unintended disclosure of an authorisation code, access token, or related response data through a redirect URI. It happens when the browser is sent to an untrusted destination, the redirect is overly broad, or parameters are exposed in the URL, allowing a third party to capture credentials or session data.
How OAuth Redirect Leakage Happens
OAuth redirect leakage occurs when a redirect URI becomes part of the data path that carries an authorization code, token, or other response material to a place the client did not intend. The weakness is usually not the OAuth grant itself, but the surrounding redirect handling, URL exposure, or trust boundary error that lets another endpoint observe or capture the response.
That means the problem can emerge in both browser-based and app-based flows. An overly broad redirect, an open redirect, a misregistered URI, or a redirect chain that crosses into an untrusted destination can all create an opportunity for the wrong party to see data that should have stayed within the intended client and authorization server exchange.
Why It Is Dangerous
The danger is that redirect leakage can turn a short-lived authorization response into a reusable credential artifact. If an attacker captures an authorization code, access token, or related session material, they may be able to impersonate the user or continue an active session before the legitimate client finishes the exchange.
This is especially important because redirect leakage often looks like a normal navigation event. The browser follows a redirect as expected, so the exposure can hide in plain sight until logs, referrers, proxy traces, analytics, or a malicious landing page reveal that sensitive OAuth response data left the intended trust boundary.
OAuth 2.0 and OpenID Connect Guide for Identity Teams explains the redirect URI, authorization code flow, PKCE, and token handling patterns that shape this risk. The core standard is defined in RFC 6749: The OAuth 2.0 Authorization Framework.
Common Exposure Paths
Redirect leakage typically appears when the application allows broad redirect matching, reuses a generic return URL handler, or places response data in locations that are easy to forward or log. Query strings, fragment handling, browser history, referrer headers, intermediary pages, and chained redirects can all widen the exposure surface.
In native and mobile apps, the same pattern can show up through custom URL schemes, misclaimed app links, or poor handler validation. In web applications, open redirects and weak allowlists can carry the user from a legitimate OAuth endpoint to a destination that captures the returned data before the client can process it.
Open Redirect Guide covers the redirect and validation mistakes that commonly enable OAuth code theft. For mobile and app-link scenarios, Mobile Deep Link and App Link Security Guide shows how redirect handling can be validated safely, and Mobile T1635 Steal Application Access Token maps URI hijacking to token theft behavior.
What Good Defenses Look Like
Strong defenses keep redirect destinations exact, pre-registered, and narrowly scoped to the intended client or app handler. They also minimize how much sensitive data is placed in the URL path, because any URL-based value is easier to expose through logs, referers, browser state, or unintended navigation than data kept out of the browser address line.
Where a flow must rely on redirects, sender-constraining techniques, exact redirect matching, and validated app link ownership reduce the chance that a stolen response can be replayed elsewhere. Defensive review should also cover whether the same redirect endpoint is shared across environments, brands, or products, because that is where accidental broadening often begins.
Top 10 OAuth Security Risks brings together the broader OAuth control set, including redirect validation, token theft reduction, and PKCE. The protocol-level baseline is reinforced by RFC 9700: Best Current Practice for OAuth 2.0 Security, which addresses modern OAuth deployment hardening.
Risk and Threat Considerations
Redirect leakage is risky because it can expose a valid OAuth response to a party outside the intended trust boundary. Once an attacker or untrusted destination sees the code or token, the exposure can become account takeover, session hijack, or downstream access to protected APIs and user data.
Failure mechanism: The implementation trusts a redirect path, URL parameter, or intermediary destination that can observe or capture OAuth response material before the legitimate client consumes it.
Impact: A stolen authorization code or token can be replayed, exchanged, or abused for unauthorized access, especially when the flow lacks strong sender binding or tight redirect validation.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP ASVS, NIST SP 800-53 Rev 5 and CIS Controls v8 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP ASVS | V10 — OAuth and OpenID Connect | Covers OAuth redirect handling and token response exposure risks. |
| Recommendation — Enforce exact redirect URI validation and secure OAuth callback handling. | ||
| NIST SP 800-53 Rev 5 | IA-2 — Identification and Authentication (Organizational Users) | OAuth redirect leakage can expose authenticating users' session material. |
| AC-3 — Access Enforcement | OAuth responses grant access, so redirect leakage can bypass intended enforcement. | |
| SC-23 — Session Authenticity | Redirect leakage can expose or replay session-establishing material. | |
| Recommendation — Validate authentication flows so redirect handling cannot expose usable session material. Limit access tokens to their intended use and reject redirected responses that escape control. Bind and verify session-related OAuth exchanges to prevent redirected token reuse. | ||
| CIS Controls v8 | CIS-6 — Access Control Management | Controls who can obtain and use OAuth-derived access across applications. |
| Recommendation — Tighten application access paths so leaked OAuth responses cannot be reused broadly. | ||
Practitioner Guidance
What to watch for: Review any OAuth flow that uses broad redirect matching, shared return URLs, deep links, or URL-embedded response data. Those are the places where leakage usually starts, even when the underlying authorization server is correctly configured.
Governance implication: Treat redirect URI design as part of application security review, not as a minor integration detail. The safest pattern is an exact, narrowly owned redirect destination with minimal URL exposure and clear validation of every callback path.
Related resources from NHI Mgmt Group
Deepen Your Knowledge
Free weekly newsletter
Subscribe to the NHI & AI Identity Journal
The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.
Bonus 33% off our NHI Course when you subscribe.
Reviewed and updated by the NHIMG editorial team on November 25, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org