The `ndsudo` is a tool shipped with Netdata Agent. The version v1.45.0 and below contain vulnerability, which allows an attacker to gain privilege escalation using `ndsudo` binary. The vulnerability is untrusted search path, when searching for additional binary files, such as `nvme`. An attacker can create malicious binary with same name and add the directory of this binary into `$PATH` variable. The `ndsudo` will trust the first occurence of this binary and execute it.
Vulnerability
CVE-2024-32019
ndsudo: local privilege escalation via untrusted search path
Vulnerability details
- Score
- 8.8
- Severity
- high
CVSS 3.1 · GitHub_M
Vector string
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:HDescription
Netdata is an open source observability tool. In affected versions the `ndsudo` tool shipped with affected versions of the Netdata Agent allows an attacker to run arbitrary programs with root permissions. The `ndsudo` tool is packaged as a `root`-owned executable with the SUID bit set. It only runs a restricted set of external commands, but its search paths are supplied by the `PATH` environment variable. This allows an attacker to control where `ndsudo` looks for these commands, which may be a path the attacker has write access to. This may lead to local privilege escalation. This vulnerability has been addressed in versions 1.45.3 and 1.45.2-169. Users are advised to upgrade. There are no known workarounds for this vulnerability.
CVE ProgramExploit source choices
9 sourcesPOC for netdata ndsudo vulnerability - CVE-2024-32019
CVE-2024-32019 is a high-severity local privilege escalation vulnerability in Netdata (versions >= 1.44.0-60 < 1.45.3), caused by insecure use of the PATH variable in the ndsudo SUID binary, allowing attackers to execute arbitrary commands as root.
this is a poc for the CVE-2025-24893
Netdata ndsudo Privilege Escalation PoC
x0da6h/poc-for-cve-2024-32019 source repository
Bash script for Privilege Escalation via "ndsudo" (Netdata Local Exploit)
ayub0x7/cve-2024-32019-poc source repository
Netdata ndsudo PoC