Skip to content

JWT token decoded without signature verification

Description

JWT decoded without verification. This may allow forged tokens to be accepted. Always call `.verify()` before using claims.

Examples

Insecure Code

java
JWT decodedToken = JWT.decode(token);

Secure Code

java
JWT decodedToken = JWT.decode(token); decodedToken.verify();

Remediation

Call `.verify()` on the decoded JWT token before using its claims.

Rule Details

FieldValue
IDCODE-0558
CategoryCrypto
SeverityMEDIUM
CWECWE-347
ConfidenceMEDIUM
ImpactHIGH
LikelihoodLOW
ExploitabilityMODERATE
Tagsjwt, authentication
OWASPA08:2021-Software and Data Integrity Failures

References