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

Description#

The code uses a hardcoded secret or private key for signing JWTs, storing sensitive credentials directly in the source code. This makes it easy for attackers to discover and misuse these secrets if the code is exposed.

Impact#

If exploited, an attacker could forge or tamper with JWT tokens, potentially gaining unauthorized access to user accounts or protected resources. Hardcoded secrets also increase the risk of credential leaks, especially if the code is shared or stored in version control.