Property
Languageruby
Severityhigh
CWECWE-798: Use of Hard-coded Credentials
OWASPA07:2021 - Identification and Authentication Failures
Confidence LevelHigh
Impact LevelMedium
Likelihood LevelMedium

Description#

A hardcoded password is used for HTTP basic authentication in a controller, meaning the credential is directly written in the source code. This makes it easy for anyone with code access—including those outside your team—to see and misuse the password.

Impact#

If the code is shared or pushed to version control, attackers could find and use the hardcoded password to gain unauthorized access to protected parts of your application, leading to data breaches or further compromise of the system.