Command injection in Sudo - CVE-2017-1000367
Published: May 31, 2017 / Updated: April 7, 2020
Vulnerability identifier: #VU6846
CSH Severity: Low
CVSS v4: 5.1 [CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N]
CVE-ID: CVE-2017-1000367
CWE-ID: CWE-77
Exploitation vector: Local access
Exploit availability:
Public exploit is available
Vulnerability details
The vulnerability allows a local attacker to gain elevated privileges on the target system.
The weakness exists due to command validation flaw in the get_process_ttyname() function. A local attacker can issue a specially crafted sudo command, cause the system to recognize the user's tty as an arbitrary file and overwrite arbitrary files. Exploitation of the bug is possible in case a malicious user has sudo privileges, the system contains SELinux and sudo has been built on SELinux support.
Successful exploitation of the vulnerability results in root access to the system.
The weakness exists due to command validation flaw in the get_process_ttyname() function. A local attacker can issue a specially crafted sudo command, cause the system to recognize the user's tty as an arbitrary file and overwrite arbitrary files. Exploitation of the bug is possible in case a malicious user has sudo privileges, the system contains SELinux and sudo has been built on SELinux support.
Successful exploitation of the vulnerability results in root access to the system.
Affected software
Sudo
Debian Linux
Arch Linux
Gentoo Linux
Amazon Linux AMI
Red Hat Enterprise Linux for x86_64
CentOS
SUSE Linux
Slackware Linux
Ubuntu
Fedora
Opensuse
sudo (Alpine package)
sudo
Cloud Magnum Orchestration
Debian Linux
Arch Linux
Gentoo Linux
Amazon Linux AMI
Red Hat Enterprise Linux for x86_64
CentOS
SUSE Linux
Slackware Linux
Ubuntu
Fedora
Opensuse
sudo (Alpine package)
sudo
Cloud Magnum Orchestration
How to mitigate CVE-2017-1000367
Update to version 1.8.20p1.
sudo (Alpine package) - update to 1.8.20_p1-r0
sudo - addressed in versions 1.8.20p1-1.fc24, 1.8.20p1-1.fc25, 1.8.20p1-1.fc26, 1.8.20p2-1.fc24, 1.8.20p2-1.fc25, 1.8.20p2-1.fc26
sudo - addressed in versions 1.8.20p1-1.fc24, 1.8.20p1-1.fc25, 1.8.20p1-1.fc26, 1.8.20p2-1.fc24, 1.8.20p2-1.fc25, 1.8.20p2-1.fc26
Links to Public Exploits and PoC-codes
External References
Related Security Bulletins
- Privilege escalation in Sudo
- Slackware Linux update for sudo
- openSUSE update for sudo
- SUSE Linux update for sudo
- Gentoo update for sudo
- Arch Linux update for sudo
- Red Hat Linux update for sudo
- Ubuntu update for sudo
- Debian update for sudo
- Debian update for sudo
- CentOS 6 and 7 update for sudo
- Red Hat update for sudo
- Amazon Linux AMI update for sudo
- Amazon Linux AMI update for sudo
- SUSE Linux update for sudo
- SUSE Linux update for sudo
- OpenSUSE Linux update for sudo
- SUSE Linux update for sudo
- SUSE Linux update for sudo
- Command injection in sudo (Alpine package)
- Fedora 25 update for sudo
- Fedora 26 update for sudo
- Fedora 24 update for sudo
- Fedora 26 update for sudo
- Fedora 25 update for sudo
- Fedora 24 update for sudo