CVE-2016-1240: Apache Tomcat Init Script Symlink Privilege Escalation
- Vendor
- Apache Software Foundation
CVE-2016-1240 is a local privilege-escalation vulnerability in distribution-packaged Apache Tomcat init scripts. The scripts performed a root-privileged ownership change on the Catalina log without safely preventing symbolic-link substitution. A user controlling the Tomcat service account could replace the log with a symbolic link to an arbitrary filesystem target. When Tomcat was restarted or the system rebooted, the privileged init script could change ownership of the linked target to the Tomcat account. Affected packages include Debian Jessie tomcat7 before 7.0.56-3+deb8u4 and tomcat8 before 8.0.14-1+deb8u3; Ubuntu 12.04 tomcat6 and libtomcat6-java before 6.0.35-1ubuntu3.8; Ubuntu 14.04 tomcat7 and libtomcat7-java before 7.0.52-1ubuntu0.7; and Ubuntu 16.04 tomcat8 and libtomcat8-java before 8.0.32-1ubuntu1.2.
Impact, mitigation & remediation
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
Successful exploitation permits a local attacker operating as the Tomcat service account to obtain root privileges by gaining control of a security-sensitive file that is subsequently consumed by a root-executed process or job. This can result in complete compromise of system confidentiality, integrity, and availability.
Mitigation
If you can’t patch tonight, do this now.
Until patches are applied, prevent untrusted users and deployed applications from obtaining execution as, or write access available to, the Tomcat service account. Restrict write permissions on Tomcat log directories and service-managed files, monitor for unexpected symbolic links and ownership changes in those locations, and limit unprivileged ability to stop or trigger restart of the Tomcat service. Prefer service-management configurations that do not perform root-level ownership changes on files writable or replaceable by the Tomcat account.
Remediation
Patch, then assume compromise.
Install the corrected Tomcat packages supplied by the operating-system vendor. For affected Debian systems, update tomcat7 to at least 7.0.56-3+deb8u4 or tomcat8 to at least 8.0.14-1+deb8u3. For Ubuntu, apply the vendor updates for the affected release streams: Tomcat 6 on 12.04 LTS, Tomcat 7 on 14.04 LTS, and Tomcat 8 on 16.04 LTS. Apply the corresponding supported Red Hat JBoss Web Server updates where applicable, including JBoss Web Server 3.1.0 updates. Restart services as required after patching.
Exploits
1 exploit validated by Mallory's analysis. Hidden: 1 not yet analyzed, such as Exploit-DB entries.
Affected products & vendors
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
References
Frequently asked questions
- Is CVE-2016-1240 exploited in the wild?
- As of Oct 16, 2026, Mallory has no reports of CVE-2016-1240 being exploited in the wild. It is not listed in CISA KEV.
- Is there a public exploit for CVE-2016-1240?
- Yes. Mallory tracks 1 public exploit or proof of concept for CVE-2016-1240, the earliest disclosed Sep 30, 2016.
- Is there a patch for CVE-2016-1240?
- Install the corrected Tomcat packages supplied by the operating-system vendor. For affected Debian systems, update tomcat7 to at least 7.0.56-3+deb8u4 or tomcat8 to at least 8.0.14-1+deb8u3.
- What products are affected by CVE-2016-1240?
- Apache Software Foundation Tomcat.
- How severe is CVE-2016-1240?
- CVE-2016-1240 has a CVSS v3 score of 7.8 (High) and an EPSS score of 9.8% (96th percentile) as of Oct 16, 2026.
Recent activity
11 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.