It's trivial to store sensitive data in a collection, for example, and then index it with the wrong index when trying to access and export adjacent non-sensitive data.
That's assuming you're mixing sensitive data and insensitive data in one collection. Heartbleed was access of random memory, a much more serious exploit