CWE-260

Password in Configuration File
AI Translation Available

The product stores a password in a configuration file that might be accessible to actors who do not know the password.

Status
incomplete
Abstraction
base

This can result in compromise of the system for which the password is used. An attacker could gain access to this file and learn the stored password or worse yet, change the password to one of their choosing.

Common Consequences

access control
Impacts
gain privileges or assume identity

Detection Methods

automated static analysis

Potential Mitigations

Phases:
architecture and design
Descriptions:
• Avoid storing passwords in easily accessible locations.
• Consider storing cryptographic hashes of passwords as an alternative to storing in plaintext.