The software stores a password in a configuration file that might be accessible to actors who do not know the password.
Extended Description
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.
Time of Introduction
Architecture and Design
Implementation
Applicable Platforms
Languages
All
Common Consequences
Scope
Effect
Access Control
Technical Impact: Gain privileges / assume
identity
Demonstrative Examples
Example 1
Below is a snippet from a Java properties file in which the LDAP
server password is stored in plaintext.
(Bad Code)
Example
Language: Java
webapp.ldap.username=secretUsername
webapp.ldap.password=secretPassword
Potential Mitigations
Avoid storing passwords in easily accessible locations.
Consider storing cryptographic hashes of passwords as an alternative
to storing in plaintext.