Skip to content

CWE-256: Plaintext Storage of a Password

BaseLikelihood of exploit: High

The product stores a password in plaintext within resources such as memory or files.

Consequences

  • Access Control: Gain Privileges or Assume Identity

How to prevent it

  • 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.
  • 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.

Recent advisories

All advisories for CWE-256

Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor