CWE-256 — Plaintext Storage of a Password
CWE-256: Plaintext Storage of a Password
MITRE CWE weakness
| Kind | Weakness |
| Abstraction | Base |
| Status | Incomplete |
| Likelihood of exploit | High |
Description
The product stores a password in plaintext within resources such as memory or files.
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.
General — A programmer might attempt to remedy the password management problem by obscuring the password with an encoding function, such as base 64 encoding, but this effort does not adequately protect the password because the encoding can be detected and decoded easily.
References
- CWE page: https://cwe.mitre.org/data/definitions/256.html
- CWE list: https://cwe.mitre.org/data/index.html