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

validate_exp should also reject tokens that contain a exp field but that can not be parsed #369

Open
LucioFranco opened this issue Feb 2, 2024 · 0 comments

Comments

@LucioFranco
Copy link

If you have an exp field but have set required claims to not include this field, then validate_exp currently will try to parse the claim. If the claim for example is not parsable, say you used a string based timestamp instead of a numeric timestamp, it should reject the validation instead of silently allowing the token through. This for example, would allow a token with a ISO8601 timestamp that is expired to pass because it was unable to parse. This was quite some surprising behavior, even though technically the JWT is not spec compliant I would expect the validation to catch that. This seems like a potential attack vector that is not covered by the validation logic.

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

1 participant