Ensure JWT signatures are verified

Metadata

ID: python-security/insecure-jwt

Language: Python

Severity: Notice

Category: Security

Description

Use "verify_signature": False when decoding a JWT bypasses security and may authenticate users that should not be authenticated.

See Also

Non-Compliant Code Examples

import jwt

jwt.decode(encoded, options={"verify_signature": False})

Compliant Code Examples

import jwt

jwt.decode(encoded, bla={"verify_signature": False})

jwt.decode(encoded, options={"foobar": False})
import jwt

jwt.decode(encoded, options={"verify_signature": True})
jwt.decode(encoded, options={"verify_signature": True})