CVE-2024-32479: Stored XSS in LibreNMS
Summary
CVE-2024-32479: LibreNMS uses Improper Sanitization on Service template name leads to Stored XSS. Affects librenms/librenms versions < 24.4.0. Fixed in 24.4.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 and management system. It provides a comprehensive set of features for monitoring network devices, collecting performance data, and generating alerts. LibreNMS is vulnerable to a stored cross-site scripting (XSS) attack due to improper sanitization of the service template name. This allows an attacker to inject malicious JavaScript code, which can lead to cookie stealing or the execution of arbitrary actions within the context of the user's session.
Vulnerability Detail
The vulnerability arises from the lack of proper sanitization of the service template name in the delete button's onclick event. An attacker can craft a malicious template name that includes JavaScript code. When the delete button is clicked, the JavaScript code is executed within the user's browser, potentially leading to unauthorized actions or data theft. The vulnerable code can be found in the ServiceTemplateController.php file of the LibreNMS source code.
How To Fix
Minimum fixed version
24.4.0
This is the first release that contains the fix.
composer require librenms/librenms:24.4.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 manually sanitize the service template name before saving it. This can be done by removing any special characters or JavaScript code from the name. However, this workaround is not foolproof and should only be used until a proper fix is implemented.
Conclusion
The stored XSS vulnerability in LibreNMS allows an attacker to inject and execute malicious JavaScript code within the context of a user's session. This can lead to unauthorized actions or data theft. It is crucial for the LibreNMS development team to address this vulnerability by implementing proper input sanitization and validation. Users are advised to stay updated with the latest releases and apply the fix as soon as it becomes available. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for librenms/librenms →
FAQ
LibreNMS is an open-source network monitoring and management system.
A stored XSS vulnerability allows an attacker to inject malicious code into a web application, which is then stored and executed by other users who access the affected page.
This vulnerability can lead to cookie stealing, unauthorized actions within the user's session, or the execution of arbitrary JavaScript code.
At the time of this report, a fix has not been released. It is recommended to follow the LibreNMS project for updates and apply the fix as soon as it becomes available.
Until a fix is available, it is recommended to restrict access to the LibreNMS application to trusted users only and regularly monitor for any suspicious activity.
References
Related vulnerabilities
Recent vulnerabilities recorded for librenms/librenms.