Qualys discovered that needrestart, before version 3.8, 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).
https://thehackernews.com/2024/11/decades-old-security-vulnerabilities.html
https://www.cve.org/CVERecord?id=CVE-2024-48991
https://github.com/liske/needrestart/commit/6ce6136cccc307c6b8a0f8cae12f9a22ac2aad59