Warning about possible security issue
See original GitHub issueHello,
As you all know, JWT provides different way to encode and decode a token. Some of those algorithm are asymmetric and others symmetric. The fact that you can have both of them working together create a breach if you can access the public_key.
I’d like to know what you think about the idea of having a warning, or not allowing it at all, to have both a symmetric and asymmetric algorithm in the jwt.decode
function.
Here you can find an example of case where you might have a security issue with your JWT.
Exemple:
Actor 1:
- Request a JWT from the Auth server
- Contact App A with the JWT provided by Auth Server.
- App A will validate the JWT with the public key
Actor 2:
- Request a JWT from the Auth server
- Get the content and modify it
- generate a new JWT token signed with the public key and the algorithm “HS256”
- Contact the App A with the new JWT
- Because both Symmetric (HS256) and Asymmetric (RS256) are allowed together in App A, the new JWT is validated and accepted
Issue Analytics
- State:
- Created 4 years ago
- Comments:9
Top Results From Across the Web
What do the security warning codes mean? | Firefox Help
Firefox shows you a warning page about a potential security risk when you try to connect to a secure site but your connection...
Read more >Alerts - CISA
Alerts provide timely information about current security issues, vulnerabilities, and exploits. Sign up to receive these technical alerts in your inbox or ...
Read more >Security Issues report - Search Console Help - Google Support
Here is a list of possible security issues, with information about how to fix each issue. Issues are classified as either errors or...
Read more >National Terrorism Advisory System Bulletin
If You See Something, Say Something® Report suspicious activity and threats of violence, including online threats, to local law enforcement, FBI ...
Read more >Apple's security flaw warning: What it means and what you ...
Apple released software updates that it says fix the exploits and warned users to download them as soon as possible. Advertisement. Here's what ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
OK, I understand your point now. A public key argument does not make sense for HS*
I agree that the interface could be improved, see also https://github.com/jpadilla/pyjwt/issues/408#issuecomment-586696809
Making public a shared secret used for HS* is wrong.
Consequently, re-using a (published) public key for HS* is wrong.
Bluntly, I see no point in your scenario.