The Qualys Threat Research Unit (TRU) discovered five Local Privilege Escalation (LPE) decade-old security vulnerabilities in the needrestart package that could allow a local attacker to gain root privileges without requiring user interaction.
The needrestart package in Ubuntu is a utility designed to ensure system stability after software updates. When packages are updated, especially ones affecting shared libraries or services, it’s often necessary to restart those services or even the entire system for changes to take effect.
The needrestart package is installed by default in Ubuntu Server, starting with version 21.04. The flaws were likely introduced with the interpreter support in needrestart version 0.8, released in April 2014.
The vulnerabilities have been tracked as CVE-2024-48990, CVE-2024-48991, CVE-2024-48992, CVE-2024-10224, and CVE-2024-11003.
These are the descriptions for the flaws:
The Qualys TRU team has developed functional exploits for disclosed vulnerabilities, warning that they are easily exploitable and may soon see public working exploits.
“These vulnerabilities in the needrestart utility allow local users to escalate their privileges by executing arbitrary code during package installations or upgrades, where needrestart is often run as the root user.” reads the advisory. “An attacker exploiting these vulnerabilities could gain root access, compromising system integrity and security.”
Successful exploitation of these flaws could expose enterprises to severe risks like unauthorized data access, malware, and operational disruptions, leading to breaches, non-compliance, and reputational harm. Immediate mitigation through software updates or disabling the vulnerability is essential.
To prevent the exploitation of the flaw Qualys researchers recommend disabling the interpreter scanning feature in needrestart by modifying its configuration file, typically located at /etc/needrestart/needrestart.conf
. Add the line $nrconf{interpscan} = 0;
to disable interpreter scanners and block the vulnerability.
Follow me on Twitter: @securityaffairs and Facebook and Mastodon
(SecurityAffairs – hacking, Ubuntu)