Simplest answer: format your Vita.
Long answer: the exploit itself is on the save file for the Gravity Crash game, stored on the memory card. If you remove the save file, or even just format the entire card, then the exploit will be removed alongside it. Once you've formatted, you can either leave it on its current version or update it. I personally would update it since the new owner won't be able to use the exploit without the exploitable game in the first place (unless you give them your PSN account along with the Vita).