Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
needrestart-privesc-cve-2024-48990 — Local privilege escalation exploit for needrestart (CVE-2024-48990) | Kitploit
Tools/GitHubGitHub/tahsinunluturk/needrestart-privesc-cve-2024-48990
Privilege EscalationVulnerability AnalysisExploitationPenetration TestingLearning & Education
GitHubtahsinunluturk/needrestart-privesc-cve-2024-48990

needrestart-privesc-cve-2024-48990

Local privilege escalation exploit for needrestart (CVE-2024-48990)

View Repository

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share
28 months agoNot yet reviewed

needrestart Privilege Escalation (CVE-2024-48990)

This repository contains a minimal local privilege escalation exploit targeting a vulnerability in needrestart (CVE-2024-48990).

The vulnerability allows arbitrary Perl code execution as root by abusing the -c configuration option, which is parsed and executed in a privileged context.

Rationale

Many existing privilege escalation exploits require compiling custom binaries, spawning additional shells, or relying on interactive command chains.

This exploit was developed to avoid those requirements by providing a straightforward local privilege escalation technique that does not require compilation, additional tooling, or interactive editor or pager abuse. Privilege escalation is achieved by creating a SUID-root shell through needrestart's privileged configuration execution.

How it works

needrestart is implemented in Perl and executes configuration files passed via the -c option as Perl code with root privileges.

By supplying a crafted configuration file containing a system() call, arbitrary commands can be executed as root, leading to local privilege escalation.

Usage

Run the exploit:

root@kitploit:~
python3 needrestart_privesc.py

If the user is permitted to execute needrestart via sudo, the script will invoke it and create a SUID-root shell at /tmp/bash. If sudo requires a password, it will be prompted normally.

Upon successful execution, a root shell is spawned automatically.

Optional flags

Disable automatic shell spawning:

root@kitploit:~
python3 needrestart_privesc.py --no-shell

Clean up created artifacts:

root@kitploit:~
python3 needrestart_privesc.py --cleanup

Notes

  • Passwordless sudo is not required.
  • The user must be allowed to execute needrestart via sudo.
  • The payload execution is silent and relies on side effects rather than output.

Disclaimer

This code is provided for educational and research purposes only.

Download Tool