-
Notifications
You must be signed in to change notification settings - Fork 0
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
Mitigate CVE-2024-33663 #285
Comments
I would like to fix this if you don't mind. IIRC I also implemented the original JWT support in dearmep. Relevant docs: https://fastapi.tiangolo.com/tutorial/security/oauth2-jwt/ |
Thanks for the offer. I'm still not super confident that it's a good time right now, because of the changes that might still be coming while I'm working on #269 and #286, but the JWT implementation is fairly isolated (basically just Feel free to try! I assume you're planning on migrating to PyJWT instead of trying to pin the protocols with jose? Also, I've noticed that there is no test coverage for that file. I'd appreciate some tests a lot. |
Yes. I finished the migration and I will push once I have added some tests. I need to figure out how we do tests in this project... |
Basically it's just standard pytest, but there are some wild things going on with some of the fixtures, in order to be able to modify the config on the fly or something, I don't even really remember. At some point we basically stopped writing tests altogether due to lack of time 😔 but we should start doing them again. I guess you'd probably best start a new file like Maybe I don't leave it up to you then 😅 I'd recommend you do unit tests on just the token functions and not against the API. If you're eager to add some against the API, let's do a separate PR for those, to not endanger the upcoming release. |
I'll only test the tokens then. Edit: Using the fixtures wasn't that hard after all. |
Because of security issues. Package description: https://pypi.org/project/PyJWT/ fix #285 Signed-off-by: Jörn Bethune <jö[email protected]>
Because of security issues. Package description: https://pypi.org/project/PyJWT/ fix #285 Signed-off-by: Jörn Bethune <jö[email protected]>
Because of security issues. Package description: https://pypi.org/project/PyJWT/ fix #285 Signed-off-by: Jörn Bethune <jö[email protected]>
The library we're using for JWT-based authentication (i.e., the tokens the frontend is using to authenticate with the backend), python-jose, has an open security vulnerability, CVE-2024-33663, since April. There is no fix available, and development of the library seems to have stalled.
Having skimmed the details, I wonder whether we can mitigate this short-term by pinning the list of allowed algorithms. However, we might also just switch to a library that doesn't have this problem and that's actively maintained, e.g. PyJWT.
The text was updated successfully, but these errors were encountered: