Heap Inspection Security Vulnerability

Heap Inspection is about sensitive information stored in the machine memory unencrypted, so that if an attacker performs a memory dump (for example, the Heartbleed bug), that information is compromised. Thus, simply holding that information makes it vulnerable.

One can mitigate this by storing such sensitive information in a secured manner, such as a GuardedString object instead of a String or a char array, or encrypting it and scrubbing the original short after.

For more information, see this CWE (describes C/C++ but same relevancy for Java).


See this answer on security.stackexchange.com for the question "Is it more secure to overwrite the value char[] in a String".

TLDR: You can't do much about it.

PS: As that is a sister stackexchange site, I am not copying the answer here (also, it is too long). If a moderator disagrees, fell free to copy/paste it.