vendor:
Tomcat
by:
Dawid Golunski
7,8
CVSS
HIGH
Local Privilege Escalation
264
CWE
Product Name: Tomcat
Affected Version From: Tomcat 8 <= 8.0.36-2, Tomcat 7 <= 7.0.70-2, Tomcat 6 <= 6.0.45+dfsg-1~deb8u1
Affected Version To: Tomcat 8 <= 8.0.36-2, Tomcat 7 <= 7.0.70-2, Tomcat 6 <= 6.0.45+dfsg-1~deb8u1
Patch Exists: YES
Related CWE: CVE-2016-1240
CPE: a:apache:tomcat
Other Scripts:
N/A
Tags: N/A
CVSS Metrics: N/A
Nuclei References:
N/A
Nuclei Metadata: N/A
Platforms Tested: Debian, Ubuntu
2016
Apache Tomcat packaging on Debian-based distros – Local Root Privilege Escalation
The tomcat init script provided by the tomcat packages on Debian-based distributions (including Debian, Ubuntu etc.) is vulnerable to a local privilege escalation attack. The vulnerable init script is installed as: /etc/init.d/tomcat[6-8]. The init script allows local attackers who have already gained access to the tomcat account (for example, by exploiting an RCE vulnerability in a java web application hosted on Tomcat, uploading a webshell etc.) to escalate their privileges from tomcat user to root and fully compromise the target system.
Mitigation:
Remove the SUID bit from the tomcat init script and ensure that the tomcat user does not have write access to the script.