JWT Signature Bypass via None Algorithm

Severity: High
Summary#

Invicti detected that the application is vulnerable to the JSON Web Tokens (JWT) None Algorithm attack.

Impact#

By changing the algorithm in the JWT header to ‘none’, an attacker can bypass the signature mechanism and tamper with the values inside the JWT payload. By doing this an attacker can escalate privileges, impersonate users, or trigger unintended application states that were meant to be prevented by the use of a tamper-proof token solution.

Remediation#

It is mandatory to check the alg parameter inside of the JWT prior to verification. That is to ensure that it is exactly the same algorithm used during the signing process. The server-side code responsible for checking the JWT token should be audited and fixed. That is to allow for the proper verification of the provided signature corresponding to the algorithm specified in the JWT header.

Further Reading#

Build your resistance to threats. And save hundreds of hours each month.

Get a demo See how it works