Executive brief
LibreNMS, a popular open-source network monitoring system, contains a vulnerability that allows an authenticated user to take full control of the server. By creating a device with a specially crafted name and modifying system settings, an attacker can force the server to execute malicious commands. This could lead to a complete compromise of the monitoring infrastructure, unauthorized access to network data, and a foothold for further attacks within the corporate network.
Technical details
LibreNMS is vulnerable to a multi-stage OS command injection. An authenticated attacker can first exploit a lack of sanitization in the 'Add Device' hostname field to create a directory containing shell metacharacters via the PollDevice job. Next, the attacker can use the SettingsController to update the 'snmpget' configuration parameter, pointing it to a system binary using a path traversal that includes the malicious directory. Finally, by visiting the 'About' page, the AboutController executes a shell_exec() call using the poisoned 'snmpget' path, resulting in arbitrary code execution with the privileges of the web server user. This vulnerability is addressed in version 24.10.0.
Affected products
- LibreNMS LibreNMS < 24.10.0
Timeline
- 2024-11-14: advisory: Vendor security advisory published (GHSA-x645-6pf9-xwxw)
- 2024-11-15: other: Metasploit module released
- 2026-05-08: disclosed: NVD publication date