CWE-256: Plaintext Storage of a Password

BaseIncompleteExploit Likelihood: High

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

View on MITRE
Back to CWE Lookup

Technical Details

Structure
Simple

Applicable To

Languages
Not Language-Specific
Platforms

Frequently Asked Questions

What is CWE-256: Plaintext Storage of a Password?+

CWE-256: Plaintext Storage of a Password is a Common Weakness Enumeration (CWE) entry maintained by MITRE. The product stores a password in plaintext within resources such as memory or files.

What are the security consequences of Plaintext Storage of a Password?+

If exploited, CWE-256 (Plaintext Storage of a Password) it can compromise Access Control, leading to outcomes such as Gain Privileges or Assume Identity.

How do you prevent or mitigate Plaintext Storage of a Password?+

Recommended mitigations for CWE-256 include: Avoid storing passwords in easily accessible locations. 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.

Which programming languages are affected by Plaintext Storage of a Password?+

CWE-256 commonly affects Not Language-Specific. Note that weaknesses are often language-agnostic patterns, so secure coding practices apply broadly.

What are real-world examples of Plaintext Storage of a Password?+

MITRE documents real CVEs mapped to CWE-256, including CVE-2022-30275. You can look up the full details of each CVE, including CVSS scores and remediation guidance, on our CVE Lookup tool.

What is the difference between a CWE and a CVE?+

A CWE (Common Weakness Enumeration) like CWE-256 describes a category of software weakness — the underlying flaw type. A CVE (Common Vulnerabilities and Exposures) identifies a specific, real-world vulnerability in a particular product. In short, a CWE is the kind of mistake, and a CVE is an instance of that mistake being found in software.

Learn More