Bug class · Advanced
OAuth and single sign-on flaws
Mistakes in OAuth, OpenID Connect, SAML or token handling that leak codes and tokens or link an attacker's identity to a victim's account.
- median public bounty
- $3,375
How it works
Full lessonThe pattern behind every report in this class.
OAuth and single sign-on (SSO) flaws are among the most impactful bugs in bug bounty programmes because they often lead directly to account takeover. When an authorisation server mishandles redirect URIs, tokens, or SAML assertions, an attacker can steal a victim's credentials or session and act as them. Programmes care deeply about these issues because a single flaw can compromise many users at once, and the affected systems are often central to authentication across an entire platform.
These flaws typically lead to unauthorised access to user accounts, data exposure, and in some cases full administrative control. Common outcomes include stealing OAuth tokens or authorisation codes, bypassing consent screens, forging SAML assertions to log in as arbitrary users, and persisting sessions after logout. The evidence shows reports ranging from token leakage through third-party integrations to complete authentication bypasses in SAML flows.
OAuth and SSO issues are most often found in features that involve third-party integrations, social login, and enterprise SSO. Specific areas include device authorisation pages, group-level OAuth application management, SAML login endpoints, session cookies tied to OAuth profiles, and redirect handling after authentication. Public-facing government sites and platforms that allow custom OAuth clients are also frequent targets.
OAuth flows rely on redirects to pass authorisation codes or tokens between the authorisation server and the client application. If the redirect URI validation is weak, an attacker can manipulate it to send the code or token to a domain they control. Common weaknesses include accepting any path on a whitelisted domain, allowing path traversal, or permitting wildcard subdomains. This enables token theft and subsequent account takeover.
Things to try
All 111Each line worked in a disclosed report. Test only what a program's scope allows.
Third-party integrations and token leakage 30
- Check whether a Facebook OAuth token can be leaked through a GitLab integration.
- Check whether a Microsoft OAuth misconfiguration allows full account takeover.
- Check whether a Facebook OAuth token can be leaked through a Twitter integration.
- Check whether a Facebook OAuth token can be leaked through a Shopify integration.
Redirect URI validation and bypass 19
- Test whether the OAuth redirect_uri accepts any path on the whitelisted domain rather than an exact URL.
- Use path traversal segments inside the redirect_uri to escape the intended path and land the code on an attacker-controlled page.
- Chain a permissive redirect_uri with an open redirect on a subdomain to carry the token to an attacker site.
- Point the redirect_uri at a page that contains an external link and check whether the authorisation code leaks in the Referer header.
Authorisation code and token lifecycle 12
- Change the response_type to token on the authorisation request and check whether the access token is returned to the redirect target.
- Present a third-party OAuth token to the session-bridge endpoint and check whether it mints a full web session for the token's user.
- After minting a session through the bridge, check whether account settings can be changed and whether the session persists.
- Check whether a stolen UUID code can be used to impersonate a user in Keycloak.
OAuth client registration and consent 12
- Check whether the OAuth flow issues authorisation codes to users with unverified email addresses.
- Send a direct POST to the OAuth authorisation endpoint with an unverified email and check whether the verification prompt is bypassed.
- Check whether the OAuth permission screen accurately reflects the scopes actually granted to the token.
- Check whether the OAuth application creation form validates the scopes parameter against a whitelist.
SAML assertion and signature handling 11
- Send a forged or manipulated SAML response to test whether the assertion or signature is validated at all.
- Send a SAML response with the signature element omitted to the ACS endpoint and see whether it is accepted.
- Modify the SAML assertion and supply a matching digest outside the signed region to see whether the signature check is bypassed.
- Test whether the SAML library selects DigestValue and Reference elements from anywhere in the document rather than only within SignedInfo.
Typical fixes
- Delete or mark the authorisation-code row on exchange and check the code's own expiry column rather than a client-supplied lifetime.
- Ensure the validated signature covers the exact response or assertion elements used for authentication.
- Require proof of ownership of redirect URIs at client registration and disable the implicit grant.
Tips for beginners
All 13- Start by mapping all OAuth and SSO flows in the target application. Look for social logins, third-party integrations, and enterprise SSO endpoints. Use a proxy to intercept requests and understand how redirect URIs, state parameters, and tokens are handled.
- Test redirect URI validation thoroughly. Try adding paths, query parameters, fragments, and path traversal sequences to see if the server accepts them. Also test with different subdomains, including non-existent ones, and check if the authorisation code or token is sent to your controlled domain.
- Check for missing or weak state parameters. If the state parameter is absent or not validated, you may be able to perform CSRF attacks to link your account to a victim's or replay a callback in another session.
- Examine the authorisation code exchange process. Try replaying a code to see if it can be used more than once. Check if the code expires and if it is bound to the client. Also test if tokens issued for one client are accepted by another service.
- For SAML, test for signature validation bypasses. Try removing the signature, wrapping assertions, or modifying the signed elements. Check if the application accepts unsigned assertions or if the signature is not bound to the correct elements.
- Review consent screens and scopes. Ensure that all requested scopes are displayed and that the application does not grant more permissions than shown. Test if you can inject text into the scopes parameter or bypass consent entirely.
Start here: a reading path
Open the pathClear reports in order, easiest first.
-
1
Possible to redirect to a (non-existing) subdomain after logging in via GitHub (leaking the token)Beginner
Likely the OAuth application's redirect_uri whitelist was configured to allow any subdomain of the target domain rather than exact URLs.
-
2
Application-Secret-Embedded-In-Login-Flow-For-Facebook-Swag-StoreBeginner
The application secret was included as a parameter in the OAuth authorisation URL, exposing it to the client.
-
3
JWT: How I turned a Regular User into an Admin in 3 StepsBeginner
The server trusted the algorithm specified in the token's header and accepted 'none', thereby skipping signature verification.
-
4
Incorrect param parsing in Digits web authenticationIntermediate
The client-side JavaScript parser assumed only '&' separates parameters, but the server also accepted ';', creating a parsing mismatch that allowed host validation bypass.
-
5
Insufficient OAuth RevocationIntermediate
When a user revokes an OAuth application's access, only access tokens are revoked, not the authorization grants. An attacker can store an authorization code and redeem it within 10 minutes after revocation to regain access.
-
6
OneLogin authentication bypass on WordPress sitesIntermediate
The plugin's signature verification was conditional on the presence of a signature element, so omitting that element bypassed all validation.
-
7
Device OAuth flow allows for "cross window forgery" due to ID on accept button, leading to full API access as victim (regression)Intermediate
The Authorize button in the device OAuth flow had an ID attribute, allowing it to be targeted by a fragment identifier in a cross-window forgery attack.
-
8
$8,800 for a Redirect Nobody Validated: Stealing OAuth Tokens ThrIntermediate
The OAuth authorization endpoint validated redirect_uri by domain only, without accounting for open redirect paths on that same trusted domain.
Guides and techniques
View allThe best explainers, cheat sheets and technique posts on OAuth / SSO, from around the web.
-
The Current Landscape of OAuth AttacksUnit 42 surveys current OAuth attack techniques, giving researchers a structured map of redirect, consent and token abuse patterns.
Explainer unit42.paloaltonetworks.com
-
The Bug Bounty Playbook: OAuth Callback and Redirect ManipulationPlaybook for finding OAuth flaws through callback and redirect URI manipulation in bug bounty targets.
Technique medium.com
-
OAuth 2.0 Authentication VulnerabilitiesPortSwigger explains OAuth 2.0 flows and the common implementation flaws that let attackers hijack accounts.
Explainer portswigger.net
-
A Practical JWT Attacks Cheat Sheet (Built from PortSwigger)A condensed JWT attack cheat sheet ordered by testing priority, distilled from PortSwigger's academy material.
Cheat sheet medium.com
-
SAML BibleNetspi's deep guide to common SAML single sign-on flaws and how to find and exploit them.
Explainer blog.netspi.com
Highest paid
View allThe biggest public bounties for OAuth / SSO.
-
Facebook OAuth Framework VulnerabilityMeta Write-up
$55,000 -
GitHub’s OAuth FlowGitHub Write-up
$25,000 -
1-click Oauth client takeover through henhouse UIGoogle Write-up
$13,340 -
Confused Deputy: Google IdP Universal Account Takeover via Device Code Flow HijackingGoogle Write-up
$13,337 -
Instagram account takeover by malicious appsMeta Write-up
$12,000 -
OneLogin authentication bypass on WordPress sitesUber HackerOne
$10,000 -
Malicious reinstallation of jsm widget app (installed by default in JSM) allows extracting private oauth tokens and user dataCritical Atlassian Bugcrowd
$10,000 -
SAML Authentication Bypass on uchat.uberinternal.comHigh Uber HackerOne
$8,500
Newest reports
All 352Most recently disclosed.
-
-
-
(Pwn2Own) Synology DiskStation DS925+ VerifySamlResponse Authentication Bypass VulnerabilityHigh Zero Day Initiative Advisory
-
-
-
-
The Callback Apigee Checked and Then IgnoredGoogle Write-up
$5,000 -
-
-
New OAuth / SSO reports by email
Follow OAuth / SSO and get each week's new disclosures in one short email.