Variant · Low-Medium

CWE-316: Cleartext Storage of Sensitive Information in Memory

The product stores sensitive information in cleartext in memory.

CWE-316 · Variant Level ·4 CVEs

Description

The product stores sensitive information in cleartext in memory.

The sensitive memory might be saved to disk, stored in a core dump, or remain uncleared if the product crashes, or if the programmer does not properly clear the memory before freeing it. It could be argued that such problems are usually only exploitable by those with administrator privileges. However, swapping could cause the memory to be written to disk and leave it accessible to physical attack afterwards. Core dump files might have insecure permissions or be stored in archive files that are accessible to untrusted people. Or, uncleared sensitive memory might be inadvertently exposed to attackers due to another weakness.

Potential Impact

Confidentiality

Read Memory

Real-World CVE Examples

CVE IDDescription
CVE-2025-24870GUI for a desktop client stores credentials in program memory, allowing privilege escalation
CVE-2001-1517Sensitive authentication information in cleartext in memory.
CVE-2001-0984Password protector leaves passwords in memory when window is minimized, even when "clear password when minimized" is set.
CVE-2003-0291SSH client does not clear credentials from memory.

Taxonomy Mappings

  • PLOVER: — Plaintext Storage in Memory
  • Software Fault Patterns: SFP23 — Exposed Data

Frequently Asked Questions

What is CWE-316?

CWE-316 (Cleartext Storage of Sensitive Information in Memory) is a software weakness identified by MITRE's Common Weakness Enumeration. It is classified as a Variant-level weakness. The product stores sensitive information in cleartext in memory.

How can CWE-316 be exploited?

Attackers can exploit CWE-316 (Cleartext Storage of Sensitive Information in Memory) to read memory. This weakness is typically introduced during the Architecture and Design phase of software development.

How do I prevent CWE-316?

Follow secure coding practices, conduct code reviews, and use automated security testing tools (SAST/DAST) to detect this weakness early in the development lifecycle.

What is the severity of CWE-316?

CWE-316 is classified as a Variant-level weakness (Low-Medium abstraction). It has been observed in 4 real-world CVEs.