The secret used to create the JWT signature can be guessed easily. If the JWT is used to control access to the application, an attacker could take advantage of this vulnerability to forge a token and impersonate other users or even elevate privileges.
To fix this issue, you must use a secret that cannot be guessed. For instance, if you use
hs256 as a signing algorithm, ensure its key has at least 256 bits. To generate a key with the desired length, use a cryptographically secure random generator function to generate a 32 bytes string (256 bits).