Decade-old local privilege escalation bugs impacts Ubuntu needrestart package

Share:

Decade-old flaws in the needrestart package in Ubuntu Server could allow local attackers to gain root privileges without user interaction.

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:

  • CVE-2024-48990 (CVSS score: 7.8) – A vulnerability that allows local attackers to execute arbitrary code as root by tricking needrestart into running the Python interpreter with an attacker-controlled PYTHONPATH environment variable.
  • CVE-2024-48991 (CVSS score: 7.8) – A vulnerability that allows local attackers to execute arbitrary code as root by winning a race condition and tricking needrestart into running their own, fake Python interpreter (instead of the system’s real Python interpreter).
  • CVE-2024-48992 (CVSS score: 7.8) – A vulnerability that allows local attackers to execute arbitrary code as root by tricking needrestart into running the Ruby interpreter with an attacker-controlled RUBYLIB environment variable.
  • CVE-2024-11003 (CVSS score: 7.8) and CVE-2024-10224 (CVSS score: 5.3) – These vulnerabilities allows a local attacker to execute arbitrary shell commands.

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.

Source

Leave a Comment

Your email address will not be published. Required fields are marked *

loader-image
London, GB
2:56 am, Apr 22, 2025
weather icon 7°C
L: 6° | H: 9°
overcast clouds
Humidity: 88 %
Pressure: 1015 mb
Wind: 2 mph WNW
Wind Gust: 6 mph
UV Index: 0
Precipitation: 0 mm
Clouds: 97%
Rain Chance: 0%
Visibility: 10 km
Sunrise: 5:49 am
Sunset: 8:07 pm
DailyHourly
Daily ForecastHourly Forecast
Today 10:00 pm
weather icon
6° | 9°°C 0 mm 0% 10 mph 89 % 1017 mb 0 mm/h
Tomorrow 10:00 pm
weather icon
8° | 10°°C 1 mm 100% 13 mph 94 % 1018 mb 0 mm/h
Thu Apr 24 10:00 pm
weather icon
8° | 13°°C 0 mm 0% 4 mph 88 % 1022 mb 0 mm/h
Fri Apr 25 10:00 pm
weather icon
10° | 17°°C 0 mm 0% 8 mph 90 % 1021 mb 0 mm/h
Sat Apr 26 10:00 pm
weather icon
10° | 17°°C 1 mm 100% 14 mph 94 % 1021 mb 0 mm/h
Today 4:00 am
weather icon
7° | 7°°C 0 mm 0% 4 mph 87 % 1015 mb 0 mm/h
Today 7:00 am
weather icon
8° | 8°°C 0 mm 0% 4 mph 89 % 1015 mb 0 mm/h
Today 10:00 am
weather icon
11° | 13°°C 0 mm 0% 7 mph 75 % 1016 mb 0 mm/h
Today 1:00 pm
weather icon
16° | 16°°C 0 mm 0% 8 mph 42 % 1017 mb 0 mm/h
Today 4:00 pm
weather icon
16° | 16°°C 0 mm 0% 10 mph 44 % 1016 mb 0 mm/h
Today 7:00 pm
weather icon
13° | 13°°C 0 mm 0% 10 mph 59 % 1016 mb 0 mm/h
Today 10:00 pm
weather icon
10° | 10°°C 0 mm 0% 7 mph 77 % 1016 mb 0 mm/h
Tomorrow 1:00 am
weather icon
10° | 10°°C 0 mm 0% 7 mph 79 % 1014 mb 0 mm/h
Name Price24H (%)
Bitcoin(BTC)
€76,724.95
1.27%
Ethereum(ETH)
€1,375.19
-2.46%
Tether(USDT)
€0.87
0.02%
XRP(XRP)
€1.81
-1.19%
Solana(SOL)
€120.62
-1.96%
USDC(USDC)
€0.87
0.01%
Dogecoin(DOGE)
€0.140255
0.85%
Shiba Inu(SHIB)
€0.000010
-1.36%
Pepe(PEPE)
€0.000007
2.19%
Scroll to Top