A 10 year old sudo related flaw has been discovered that can make unprivileged users obtain root permissions. Linux admins should patch this critical vulnerability as soon as possible.
Read more:
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-3156
Debian
Vulnerable
$ sudoedit -s /
sudoedit: /: not a regular file
Patch
$ sudo apt update
$ sudo apt install sudo
NOT Vulnerable
$ sudoedit -s /
usage: sudoedit [-AknS] [-r role] [-t type] [-C num] [-g group] [-h host] [-p prompt] [-T timeout] [-u user] file
RedHat
You can use this script that checks if the installed sudo version is vulnerable
https://github.com/reverse-ex/CVE-2021-3156/blob/main/cve-2021-3156–2021-01-26-1453.sh
Vulnerable
$ sh cve-2021-3156--2021-01-26-1453.sh
This script (v1.0) is primarily designed to detect CVE-2021-3156 on supported
Red Hat Enterprise Linux systems and kernel packages.
Result may be inaccurate for other RPM based systems.
Detected 'sudo' package: sudo-1.8.23-9.el7.x86_64
This sudo version is vulnerable.
Patch
$ sudo yum install sudo
NOT Vulnerable
$ sh cve-2021-3156--2021-01-26-1453.sh
This script (v1.0) is primarily designed to detect CVE-2021-3156 on supported
Red Hat Enterprise Linux systems and kernel packages.
Result may be inaccurate for other RPM based systems.
Detected 'sudo' package: sudo-1.8.23-10.el7_9.1.x86_64
This sudo version is not vulnerable.