CWE-14: Compiler Removal of Code to Clear Buffers

low-risk

Sensitive memory is cleared according to the source code, but compiler optimizations leave the memory untouched when it is not read from again, aka "dead store removal."

Abstraction: Variant

Common Consequences

Confidentiality Read Memory

Detection Methods

Black Box

This specific weakness is impossible to detect using black box methods. While an analyst could examine memory to see that it has not been scrubbed, an analysis of the executable would not be successful. This is because the compiler has already removed the relevant code. Only the source code shows whether the programmer intended to clear the memory or not, so this weakness is indistinguishable from others.

White Box

This weakness is only detectable using white box methods (see black box detection factor). Careful analysis is required to determine if the code is likely to be removed by the compiler.

Real-World Examples (9)

CVE CVSS EPSS KEV
CVE-2023-32100 5.3 0.2%
CVE-2023-32098 5.3 0.2%
CVE-2023-32096 3.1 0.1%
CVE-2023-2481 5.3 0.1%
CVE-2023-32099 5.3 0.1%
CVE-2023-32097 3.1 0.1%
CVE-2023-1132 5.3 0.1%
CVE-2023-0965 3.1 0.1%
CVE-2025-64646 6.2 0.0%
0
/ 100
low-risk
Active Threat 0/50 · Minimal
Exploit Availability 0/50 · Minimal