Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refresh Tokens as-implemented are susceptible to Refresh Token Reuse Attacks #1719

Open
ThisIsMissEm opened this issue Jul 25, 2024 · 2 comments

Comments

@ThisIsMissEm
Copy link
Contributor

Currently there is no chain-of-trust relationship between access tokens and refresh tokens, this means that if an attacker gains access to a refresh token, then they may still be able to attempt to use it, without all access tokens stemming from that stolen refresh token being revoked.

Auth0 has an extremely good write up on this which explains the attack vector.

The solution here is to create a "token family", where refresh tokens are a separate record to access tokens, and they are linked together in a multiple directional way; e.g., you can start at one access token and revoke all subsequent access tokens stemming from that access token.

Having a separate refresh token model would also allow for expiration of refresh tokens independent of access tokens (which I don't believe is currently possible)

@ransombriggs
Copy link
Contributor

I hacked "chain-of-trust" into our implementation and was wondering what level of interest there is in this from the maintainers of doorkeeper. If there is interest I can share the data model changes and if those look good, I can put together some pull requests.

@ThisIsMissEm
Copy link
Contributor Author

I would be very interested in this for Mastodon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants