CWE-260 — Password in Configuration File
CWE-260: Password in Configuration File
MITRE CWE weakness
| Kind | Weakness |
| Abstraction | Base |
| Status | Incomplete |
| Likelihood of exploit | — |
Description
The product stores a password in a configuration file that might be accessible to actors who do not know the password.
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: Gain Privileges or Assume Identity
Mitigations
Architecture and Design — Avoid storing passwords in easily accessible locations.
Architecture and Design — Consider storing cryptographic hashes of passwords as an alternative to storing in plaintext.
References
- CWE page: https://cwe.mitre.org/data/definitions/260.html
- CWE list: https://cwe.mitre.org/data/index.html