
Proof-of-concept exploit for CVE-2021-3156 (Baron Samedit), a heap-based buffer overflow in sudo that allows local privilege escalation to root. Written in C and BASH, it spawns a root shell on vulnerable systems.
# This would spawn a root shell directly if the sudo is vulnerable.
$ make
$ ./exploit