Uploaded image for project: 'PUBLIC - OAuth2'
  1. PUBLIC - OAuth2
  2. OAUTH2-42 REQ029 Authorization Code Flow: Prevent Impersonation of Resource Owner
  3. OAUTH2-98

REQ029.UC003 PREVENT Attacking ‘redirect_uri’ (leaking authorization codes through XSS)

    Details

    • Type: Sub-Task
    • Status: Closed
    • Priority: Minor
    • Resolution: Completed
    • Affects Version/s: None
    • Fix Version/s: 1.0-portal_7.1.0
    • Component/s: None
    • Labels:

      Description

      Same as with the implicit grant vulnerability for Implicit Flow. However in this instance it is the Authorization Code which is leaked instead of Access Token.

       

      Mitigation @ OAuth2 provider:

      • In cases where the app is stateful (cookies, HTTP session etc.), the redirect_uri can point to a headless resource that is dedicated to exchanging authorization codes for access tokens. This drastically reduces the chances of XSS vulnerability at that URL
      • Recommend to the application admin that they use a dedicated resource as above
      • Implement PKCE which expects a valid code_challenge for the token exchange

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Packages

                  Version Package
                  1.0-portal_7.1.0