Description
Qualys discovered that needrestart, before version 3.8, allows local attackers to execute arbitrary code as root by tricking needrestart into running the Python interpreter with an attacker-controlled PYTHONPATH environment variable.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| needrestart | needrestart | < 3.8 | 3.8 |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | needrestart | 3.7-3.1 | — |
| Debian 13 | needrestart | 3.7-3.1 | — |
| Debian 12 | needrestart | 3.6-4+deb12u2 | DSA-5815-1 |
| Debian 11 | needrestart | 3.5-4+deb11u4 | DLA-3957-1 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 24.04 LTS | libmodule-scandeps-perl | 1.35-1ubuntu0.24.04.1 | USN-7117-1 |
| Ubuntu 24.04 LTS | needrestart | 3.6-7ubuntu4.3 | USN-7117-1 |
| Ubuntu 22.04 LTS | libmodule-scandeps-perl | 1.31-1ubuntu0.1 | USN-7117-1 |
| Ubuntu 22.04 LTS | needrestart | 3.5-5ubuntu2.2 | USN-7117-1 |
Show 3 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 20.04 LTS | libmodule-scandeps-perl | 1.27-1ubuntu0.1~esm1 | USN-7117-1 |
| Ubuntu Pro 20.04 LTS | needrestart | 3.4-6ubuntu0.1+esm1 | USN-7117-1 |
| Ubuntu Pro 18.04 LTS | libmodule-scandeps-perl | 1.24-1ubuntu0.1~esm1 | USN-7117-1 |
| Ubuntu Pro 18.04 LTS | needrestart | 3.1-1ubuntu0.1+esm1 | USN-7117-1 |
| Ubuntu Pro 16.04 LTS | libmodule-scandeps-perl | 1.20-1ubuntu0.1~esm1 | USN-7117-1 |
| Ubuntu Pro 16.04 LTS | needrestart | 2.6-1ubuntu0.1~esm1 | USN-7117-1 |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
Metasploit 1 module
-
Ubuntu needrestart Privilege Escalation
exploit/linux/local/ubuntu_needrestart_lpe
GitHub 19 repositories · most starred shown
-
makuga01/CVE-2024-48990-PoC ★ 105 · Nov 20, 2024
PoC for CVE-2024-48990
-
pentestfunctions/CVE-2024-48990-PoC-Testing ★ 26 · Nov 24, 2024
Testing POC for use cases
-
Serner77/CVE-2024-48990-Automatic-Exploit ★ 9 · Oct 28, 2025
Automated local privilege escalation exploit for CVE-2024-48990 (needrestart v3.7), leveraging PYTHONPATH hijacking to gain root access.
-
ally-petitt/CVE-2024-48990-Exploit ★ 5 · Nov 25, 2024
My exploit for CVE-2024-48990. Full details of how I made this are on my blog.
-
ns989/CVE-2024-48990 ★ 5 · Nov 21, 2024
Exploit for CVE-2024-48990 (Local Privilege Escalation in needrestart < 3.8)
-
o-sec/CVE-2024-48990 ★ 2 · Dec 16, 2025
an exploit for CVE-2024-48990 ( Local Privilege Escalation ) in needrestart
-
Cyb3rFr0g/CVE-2024-48990-PoC ★ 2 · Nov 24, 2024
My take on the needrestart Python CVE-2024-48990
-
0x3bs/CVE-2024-48990 ★ 1 · Dec 1, 2025
i tried this in Conversor HTB machine
-
Mr-DJ/CVE-2024-48990 ★ 1 · Oct 30, 2025
PoC for CVE-2024-48990
-
NullByte-7w7/CVE-2024-48990 ★ 1 · Dec 18, 2024
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Advisories 3
- USN-7117-1 Several security issues were fixed in needrestart and Module::ScanDeps Ubuntu Security Notices (USN) · Jun 25, 2026
- DSA-5815-1 needrestart - security update Debian Security (DSA / DLA) · Mar 9, 2026
- DLA-3957-1 needrestart - security update Debian Security (DSA / DLA) · Mar 9, 2026