LibreNMS before 24.10.0 allows a remote attacker to execute arbitrary code via OS command injection involving AboutController.php's index(), SettingsController.php's update(), and PollDevice.php's initRrdDirectory().
The vulnerability results from improper input validation in three locations in the application code: the index() method of AboutController.php, the update() method of SettingsController.php, and the initRrdDirectory() method of the PollDevice.php class. An attacker with an active account in LibreNMS can provide crafted data, which is then passed to system commands without proper sanitization (CWE-78), leading to execution of arbitrary OS commands on the server hosting the application. A public exploit module is available within the Metasploit framework for this vulnerability.
An attacker can execute arbitrary operating system commands in the context of the application process, which may lead to server takeover, data theft, backdoor installation, or further lateral movement in the network.
LibreNMS should be immediately updated to version 24.10.0 or newer. Patch details are available in the official security advisory on GitHub (GHSA-x645-6pf9-xwxw). Until the update is applied, it is recommended to restrict access to the LibreNMS panel only to trusted networks and minimize the number of user accounts.
LibreNMS in all versions before 24.10.0
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:L/A:LLibrenms
APPLibrenms< 24.10.0
Related vulnerabilities
SQL Injection w LibreNMS — endpoint ajax_table.php (wyszukiwanie IPv6)
LibreNMS — niewystarczające wygasanie sesji użytkownika (CWE-613)
LibreNMS — wielokrotny command injection w parametrach serwisowych
Path Traversal w LibreNMS – dostęp do arbitralnych plików
LibreNMS — wstrzyknięcie składni RRDtool przez parametry wykresów