JWT Signature is not Verified

Severity: High
Summary#

Invicti detected that the application does not verify the signature in its JSON Web Tokens (JWT).

Impact#

An attacker might be able to tamper with the values inside the JWT token payload and escalate privileges, impersonate users, or trigger unintended application states that were meant to be prevented by the use of a tamper-proof token solution.

By exploiting this vulnerability, an attacker could alter the JWT payload to assign themselves higher privileges. For instance, consider a JWT where the original payload includes the role of a regular user, such as {"username": "joe", "role": "user"}. An attacker could modify this payload to {"username": "joe", "role": "admin"}, effectively granting themselves administrative privileges. This unauthorized escalation could allow the attacker to access sensitive administrative functions, manipulate user accounts, or change security settings.

Remediation#

It is mandatory to check the integrity of the payload by comparing the provided signature with the one generated on the server-side. The server-side code responsible for checking the JWT token should be audited and fixed in order to allow for the proper verification of the provided signature.

Further Reading#

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

Get a demo See how it works