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

algo validation missing #68

Closed
Complexicon opened this issue Feb 12, 2024 · 1 comment
Closed

algo validation missing #68

Complexicon opened this issue Feb 12, 2024 · 1 comment

Comments

@Complexicon
Copy link

Complexicon commented Feb 12, 2024

hi i just noticed while looking at your code, which is very helpful for workers btw, that there is no validation if the token algo is the same as the one specified in verify() which i would expect around here.

there is a nice writeup on the auth0 site where they explain why this could be a critical security vuln.

basically it boils down to the server checking the rs256 signature while an attacker sends a hs256 signature.

i could create a pull request to fix this if you want but it more or less boils down to if (header.alg != options.alg) throw new Error('ALG_MISMATCH')

@tsndr
Copy link
Owner

tsndr commented Feb 21, 2024

Should be fixed with v2.4.7, please reopen otherwise :)

@tsndr tsndr closed this as completed Feb 21, 2024
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