CVE-2024-50352: Stored XSS Vulnerability in LibreNMS Services Section
Summary
CVE-2024-50352: A Stored Cross-Site Scripting (XSS) vulnerability in the "Services" section of the Device Overview page allows authenticated users to inject arbitrary JavaScript through the "name" parameter when adding a service to a de... Affects librenms/librenms versions < 24.10.0. Fixed in 24.10.0. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
LibreNMS is an open-source network monitoring tool that provides a comprehensive overview of network devices and services. It allows users to monitor their network's health and performance through a web interface. The application is designed to be extensible and supports a variety of devices, making it a popular choice for network administrators. However, it has been found to be vulnerable to a Stored Cross-Site Scripting (XSS) attack, which can compromise user accounts and lead to unauthorized actions.
Vulnerability Detail
The vulnerability arises from the failure of LibreNMS to properly sanitize the 'name' parameter when adding a service to a device. This allows authenticated users to inject arbitrary JavaScript code, which is then executed in the context of other users' sessions when they view the Services section of the device's overview page. The attack can be initiated by crafting a malicious payload that exploits this flaw, potentially leading to account compromise and unauthorized actions. The specific code injection occurs in the services.inc.php file, where the unsanitized input is reflected in the HTML output.
How To Fix
Minimum fixed version
24.10.0
This is the first release that contains the fix.
composer require librenms/librenms:24.10.0
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a temporary workaround, users can avoid using the 'edit device -> services' workflow to add services until the software is updated. Instead, use the normal 'Add Service' interface, which does not exhibit this vulnerability.
Conclusion
The Stored XSS vulnerability in LibreNMS poses a significant risk to users by allowing the injection of malicious scripts. It is crucial for users to update their installations to the latest version to protect against potential exploits. Additionally, utilizing tools like Vulert can help in monitoring for such vulnerabilities in real-time.
See every vulnerability recorded for librenms/librenms →
FAQ
CVE-2024-50352 is a Stored XSS vulnerability found in the LibreNMS network monitoring tool that allows authenticated users to inject and execute arbitrary JavaScript.
If exploited, this vulnerability can allow attackers to execute malicious scripts in the context of other users' sessions, potentially compromising their accounts and enabling unauthorized actions.
Versions of LibreNMS up to 24.9.1 are affected by this vulnerability. Users should upgrade to version 24.10.0 or later to mitigate the risk.
Yes, you can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. You can check your application against this vulnerability using the Vulert playground at Vulert Scanner without needing to sign up.
The CVSS score for this vulnerability is 7.5, indicating a high severity level.
References
Related vulnerabilities
Recent vulnerabilities recorded for librenms/librenms.