In-depth lesson · OAuth / SSO
Tips for beginners
Every point the OAuth / SSO reports back under this heading, best-backed first, each with the reports it is seen in.
-
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.
Seen in 3 reports
-
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.
Seen in 3 reports
-
Check session management after logout. See if SSO sessions persist after logging out of the identity provider, or if OAuth tokens remain valid after revocation. Also test if a failed authentication still creates a valid session.
Seen in 3 reports
-
Look for token leakage through referer headers or postMessage. If the redirect URI points to a page with external links, check if the code leaks in the Referer header. Also test if the OAuth response page sends tokens to arbitrary origins via postMessage.
Seen in 3 reports
-
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.
-
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.
Seen in 2 reports
-
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.
-
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.
Seen in 2 reports
-
When reporting, demonstrate clear impact. Show that you can steal a token, bypass authentication, or access another user's data. Avoid reporting theoretical issues without proof. Make sure the affected endpoint is in scope and that the vulnerability is not a known limitation.
-
Common mistakes include testing out-of-scope domains or reporting issues that require unrealistic user interaction. Always verify that the vulnerability is exploitable in a real-world scenario and that it affects the target's users. Also, avoid reporting missing security headers as OAuth flaws.
-
If you find an OAuth misconfiguration, try to chain it with other issues like open redirects or postMessage listeners to increase impact. For example, a permissive redirect URI combined with an open redirect on a subdomain can carry the token to an attacker site.
Seen in 2 reports
-
Use the device authorisation flow carefully. Check if the user_code input can be pre-filled via URL fragment and submitted with a single keypress, potentially allowing an attacker to trick a victim into authorising a device.
Seen in 1 report