Description
The Tomcat init script in the tomcat7 package before 7.0.56-3+deb8u4 and tomcat8 package before 8.0.14-1+deb8u3 on Debian jessie and the tomcat6 and libtomcat6-java packages before 6.0.35-1ubuntu3.8 on Ubuntu 12.04 LTS, the tomcat7 and libtomcat7-java packages before 7.0.52-1ubuntu0.7 on Ubuntu 14.04 LTS, and tomcat8 and libtomcat8-java packages before 8.0.32-1ubuntu1.2 on Ubuntu 16.04 LTS allows local users with access to the tomcat account to gain root privileges via a symlink attack on the Catalina log file, as demonstrated by /var/log/tomcat7/catalina.out.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 8 | tomcat7 | 7.0.56-3+deb8u4 | DSA-3669-1 |
| Debian 8 | tomcat8 | 8.0.14-1+deb8u3 | DSA-3670-1 |
| Debian 7 | tomcat6 | 6.0.45+dfsg-1~deb7u2 | DLA-622-1 |
| Debian 7 | tomcat7 | 7.0.28-4+deb7u6 | DLA-623-1 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 16.04 LTS | tomcat6 | 6.0.45+dfsg-1ubuntu0.2 | USN-3081-2 |
| Ubuntu 16.04 LTS | tomcat7 | 7.0.68-1ubuntu0.3 | — |
| Ubuntu 16.04 LTS | tomcat8 | 8.0.32-1ubuntu1.2 | USN-3081-1 |
| Ubuntu 14.04 LTS | tomcat6 | 6.0.39-1ubuntu0.1 | — |
| Ubuntu 14.04 LTS | tomcat7 | 7.0.52-1ubuntu0.7 | USN-3081-1 |
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Red Hat JBoss Web Server 3 | hibernate4-eap6 +4 | 4.2.23-1.Final_redhat_1.1.ep6.el6 | RHSA-2017:0456, RHSA-2017:0455 |
| Red Hat JBoss Web Server 3 | jbcs-httpd24-apache-commons-daemon | 1.0.15-1.redhat_2.1.jbcs.el6 | RHSA-2017:0456, RHSA-2017:0455 |
| Red Hat JBoss Web Server 3 | jbcs-httpd24-apache-commons-daemon-jsvc | 1:1.0.15-17.redhat_2.jbcs.el6 | RHSA-2017:0456, RHSA-2017:0455 |
| Red Hat JBoss Web Server 3 | jbcs-httpd24-runtime | 1-3.jbcs.el6 | RHSA-2017:0456, RHSA-2017:0455 |
| Red Hat JBoss Web Server 3 | mod_cluster +2 | 1.3.5-2.Final_redhat_2.1.ep7.el6 | RHSA-2017:0456, RHSA-2017:0455 |
| Red Hat JBoss Web Server 3 | tomcat-native | 1.2.8-9.redhat_9.ep7.el6 | RHSA-2017:0456, RHSA-2017:0455 |
| Red Hat JBoss Web Server 3 | tomcat-vault | 1.0.8-9.Final_redhat_2.1.ep7.el6 | RHSA-2017:0456, RHSA-2017:0455 |
| Red Hat JBoss Web Server 3 | tomcat7 +11 | 7.0.70-16.ep7.el6 | RHSA-2017:0456, RHSA-2017:0455 |
| Red Hat JBoss Web Server 3 | tomcat8 +11 | 8.0.36-17.ep7.el6 | RHSA-2017:0456, RHSA-2017:0455 |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
Metasploit 1 module
-
Apache Tomcat on Ubuntu Log Init Privilege Escalation
exploit/linux/local/tomcat_ubuntu_log_init_priv_esc
Exploit-DB 1
- Apache Tomcat 8/7/6 (Debian-Based Distros) - Local Privilege Escalation EDB-40450 · local · Oct 3, 2016 · verified
GitHub 2 repositories
-
Naramsim/Offensive ★ 1 · Oct 13, 2016
Reproducible exploits for: CVE-2016-1240 CVE-2008-2938 CVE-2014-2064 CVE-2014-1904
-
mhe18/CVE_Project ★ 0 · Dec 2, 2018
CVE-2016-1240 exploit and patch
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Advisories 8
- RHSA-2017:0456 Red Hat Security Advisory: Red Hat JBoss Web Server 3.1.0 security and enhancement update Red Hat Security Advisories (RHSA) · Oct 8, 2026
- RHSA-2017:0455 Red Hat Security Advisory: Red Hat JBoss Web Server 3.1.0 security and enhancement update Red Hat Security Advisories (RHSA) · Oct 8, 2026
- DLA-623-1 tomcat7 - security update Debian Security (DSA / DLA) · Mar 9, 2026
- DLA-622-1 tomcat6 - security update Debian Security (DSA / DLA) · Mar 9, 2026
- DSA-3669-1 tomcat7 - security update Debian Security (DSA / DLA) · Mar 9, 2026
- DSA-3670-1 tomcat8 - security update Debian Security (DSA / DLA) · Mar 9, 2026
- USN-3081-1 tomcat6, tomcat7, tomcat8 vulnerability Ubuntu Security Notices (USN) · Feb 10, 2026
- USN-3081-2 tomcat6 vulnerability Ubuntu Security Notices (USN) · Feb 10, 2026
References
- 1036845 vdb-entry
- DSA-3670 vendor-advisory
- GLSA-201705-09 vendor-advisory
- http://legalhackers.com/advisories/Tomcat-DebPkgs-Root-Privilege-Escalation-Exploit-CVE-2016-1240.html
- 93263 vdb-entry
- RHSA-2017:0457 vendor-advisory
- https://security.netapp.com/advisory/ntap-20180731-0002/
- 40450 exploit
- DSA-3669 vendor-advisory
- RHSA-2017:0455 vendor-advisory
- 20161001 CVE-2016-1240 - Tomcat packaging on Debian-based distros - Local Root Privilege Escalation mailing-list
- RHSA-2017:0456 vendor-advisory
- USN-3081-1 vendor-advisory
- http://packetstormsecurity.com/files/170857/Apache-Tomcat-On-Ubuntu-Log-Init-Privilege-Escalation.html