CVE-2016-1240
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.
What to do
Fixed builds are available from Ubuntu: see the table below for the fixed version per release.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 16.04 | tomcat6 | Fixed | 6.0.45+dfsg-1ubuntu0.2 | UBUNTU-CVE-2016-1240 |
| Ubuntu 16.04 | tomcat7 | Fixed | 7.0.68-1ubuntu0.3 | UBUNTU-CVE-2016-1240 |
| Ubuntu 16.04 | tomcat8 | Fixed | 8.0.32-1ubuntu1.2 | UBUNTU-CVE-2016-1240 |
| Ubuntu 14.04 | tomcat6 | Fixed | 6.0.39-1ubuntu0.1 | UBUNTU-CVE-2016-1240 |
| Ubuntu 14.04 | tomcat7 | Fixed | 7.0.52-1ubuntu0.7 | UBUNTU-CVE-2016-1240 |
| Red Hat Enterprise Linux 7 | tomcat | Not affected | ||
| Red Hat Enterprise Linux 7 | tomcat-admin-webapps | Not affected | ||
| Red Hat Enterprise Linux 7 | tomcat-docs-webapp | Not affected | ||
| Red Hat Enterprise Linux 7 | tomcat-el-2.2-api | Not affected | ||
| Red Hat Enterprise Linux 7 | tomcat-javadoc | Not affected | ||
| Red Hat Enterprise Linux 7 | tomcat-jsp-2.2-api | Not affected | ||
| Red Hat Enterprise Linux 7 | tomcat-jsvc | Not affected | ||
| Red Hat Enterprise Linux 7 | tomcat-lib | Not affected | ||
| Red Hat Enterprise Linux 7 | tomcat-servlet-3.0-api | Not affected | ||
| Red Hat Enterprise Linux 7 | tomcat-webapps | Not affected | ||
| Red Hat Enterprise Linux 6 | tomcat6 | Not affected | ||
| Red Hat Enterprise Linux 6 | tomcat6-admin-webapps | Not affected | ||
| Red Hat Enterprise Linux 6 | tomcat6-docs-webapp | Not affected | ||
| Red Hat Enterprise Linux 6 | tomcat6-el-2.1-api | Not affected | ||
| Red Hat Enterprise Linux 6 | tomcat6-javadoc | Not affected | ||
| Red Hat Enterprise Linux 6 | tomcat6-jsp-2.1-api | Not affected | ||
| Red Hat Enterprise Linux 6 | tomcat6-lib | Not affected | ||
| Red Hat Enterprise Linux 6 | tomcat6-log4j | Not affected | ||
| Red Hat Enterprise Linux 6 | tomcat6-servlet-2.5-api | Not affected | ||
| Red Hat Enterprise Linux 6 | tomcat6-webapps | Not affected | ||
| Red Hat Enterprise Linux 5 | tomcat5 | Not affected |
What the vendor says
As published in the CVE record by debian, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
Vendor advisories:
- http://www.debian.org/security/2016/dsa-3670 (vendor-advisory)
- https://security.gentoo.org/glsa/201705-09 (vendor-advisory)
- http://rhn.redhat.com/errata/RHSA-2017-0457.html (vendor-advisory)
- http://www.debian.org/security/2016/dsa-3669 (vendor-advisory)
- https://access.redhat.com/errata/RHSA-2017:0455 (vendor-advisory)
- https://access.redhat.com/errata/RHSA-2017:0456 (vendor-advisory)
References
- http://www.securitytracker.com/id/1036845
- http://www.debian.org/security/2016/dsa-3670
- https://security.gentoo.org/glsa/201705-09
- http://legalhackers.com/advisories/Tomcat-DebPkgs-Root-Privilege-Escalation-Exploit-CVE-2016-1240.html
- http://www.securityfocus.com/bid/93263
- http://rhn.redhat.com/errata/RHSA-2017-0457.html
- https://security.netapp.com/advisory/ntap-20180731-0002/
- https://www.exploit-db.com/exploits/40450/
- http://www.debian.org/security/2016/dsa-3669
- https://access.redhat.com/errata/RHSA-2017:0455
- http://www.securityfocus.com/archive/1/539519/100/0/threaded
- https://access.redhat.com/errata/RHSA-2017:0456
- http://www.ubuntu.com/usn/USN-3081-1
- http://packetstormsecurity.com/files/170857/Apache-Tomcat-On-Ubuntu-Log-Init-Privilege-Escalation.html
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.