This is definitely exploitable. The Java heap is not super different than a normal heap in this regard.