CWE-591: Sensitive Data Storage in Improperly Locked Memory
The product stores sensitive data in memory that is not locked, or that has been incorrectly locked.
Last updated
Overview
CWE-591 (Sensitive Data Storage in Improperly Locked Memory) is a variant-level software weakness catalogued by MITRE in the Common Weakness Enumeration (CWE). It describes a recurring type of mistake that can lead to exploitable security vulnerabilities.
Background
On Windows systems, the VirtualLock function can lock a page of memory to ensure that it will remain present in memory and not be swapped to disk. However, on older versions of Windows, such as 95, 98, or Me, the VirtualLock() function is only a stub and provides no protection. On POSIX systems, the mlock() call ensures that a page will stay resident in memory but does not guarantee that the page will not appear in the swap. Some platforms, in particular Linux, do make the guarantee that the page will not be swapped, but this is non-standard and is not portable. Calls to mlock() also require supervisor privilege.
Real-world CVEs
75 recorded CVEs are caused by CWE-591 (Sensitive Data Storage in Improperly Locked Memory), including 2 in CISA's KEV (Known Exploited Vulnerabilities) catalog. KEVs are shown first. None so far in 2026 (16 in 2025).