Skip to content

AuthorizationCode not revoked early enough #82

Closed

Description

@Uzlopak

This is a small security issue if I understood bluebirds tap method correctly.

See also:
oauthjs/node-oauth2-server#637

I think we should revoke the AuthorizationCode much much earlier, by moving the revokeAuthorizationCode call above the redirectUri check.

An attack on the authorizationCode grant is usually based on a malicious redirect_uri. So if the authorization code is valid, we load the token, then tap on validateRedirectUri, and if the redirect_uri is invalid, we error and we are not calling revokeAuthorizationCode. So the authorizationCode is still existing despite it was used already.

Activity

  1. jankapunkt commented on Nov 21, 2021

    @jankapunkt
    Member

    We are about to remove Bluebird soon so we need to take this into consideration. @jwerre is currently working on a first proof of concept.

  2. jwerre commented on Nov 21, 2021

    @jwerre
    Contributor

    Yes, I agree. Removing Bluebird will be the next version so we should probably do this in this version as well. Can you make a PR for this @Uzlopak.

  3. Uzlopak commented on Nov 21, 2021

    @Uzlopak
    ContributorAuthor

    @jwerre a pr to move the revokation a step higher? Or a or for removing bluebird?

  4. jwerre commented on Nov 22, 2021

    @jwerre
    Contributor

    to move the revokation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions