Exploit database

Vulnerability

CVE-2016-5425

Vulnerability details

Score
7.8
Severity
high

CVSS 3.1 · NVD

Vector string

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Description

The Tomcat package on Red Hat Enterprise Linux (RHEL) 7, Fedora, CentOS, Oracle Linux, and possibly other Linux distributions uses weak permissions for /usr/lib/tmpfiles.d/tomcat.conf, which allows local users to gain root privileges by leveraging membership in the tomcat group.

CVE Program

Showing saved CVE details. Refresh is temporarily unavailable.

Exploit source choices

2 sources
Apache Tomcat on RedHat Based Systems Insecure Temp Config Privilege Escalation
MSF-linux--local--tomcat_rhel_based_temp_priv_escMetasploitLinux / remote

This module exploits a vulnerability in RedHat based systems where improper file permissions are applied to /usr/lib/tmpfiles.d/tomcat.conf for Apache Tomcat versions before 7.0.54-8. This may also work against The configuration files in tmpfiles.d are used by systemd-tmpfiles to manage temporary files including their creation. With this weak permission, we're able to inject commands into systemd-tmpfiles service to write a cron job to execute our payload. systemd-tmpfiles is executed by default on boot on RedHat-based systems through systemd-tmpfiles-setup.service. Depending on the system in use, the execution of systemd-tmpfiles could also be triggered by other services, cronjobs, startup scripts etc. This module was tested against Tomcat 7.0.54-3 on Fedora 21.

2016-10-10tomcat_rhel_based_temp_priv_esc.rb