Property
Languagepython
Severityhigh
CWECWE-522: Insufficiently Protected Credentials
OWASPA02:2017 - Broken Authentication
Confidence LevelHigh
Impact LevelMedium
Likelihood LevelHigh

Description#

The code is using a hardcoded string as the secret or private key for JWT token generation. Storing secrets directly in code makes them easy to discover and exposes them to anyone with access to the codebase.

Impact#

If an attacker obtains the hardcoded JWT secret, they can forge or modify tokens, impersonate users, and potentially gain unauthorized access to protected resources or sensitive data. This compromises application security and user accounts.