CVE-2024-51495: LibreNMS Stored XSS Vulnerability in Device Overview Page
Summary
CVE-2024-51495: LibreNMS has a Stored XSS ('Cross-site Scripting') in librenms/includes/html/dev-overview-data.inc.php. 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 view of network devices and their performance. It allows users to monitor various aspects of their network infrastructure, including device status, traffic, and alerts. The application is designed for ease of use and scalability, making it a popular choice among network administrators. However, like many web applications, it is susceptible to security vulnerabilities, including Cross-Site Scripting (XSS), which can compromise user accounts and data integrity.
Vulnerability Detail
A Stored Cross-Site Scripting (XSS) vulnerability exists in the Device Overview page of LibreNMS. This vulnerability allows authenticated users to inject arbitrary JavaScript code through the 'overwrite_ip' parameter when editing a device. The malicious script is executed when other users visit the device overview page, potentially leading to account compromise and unauthorized actions. The root cause is the failure to properly sanitize user input before including it in the HTML output, specifically in the 'Assigned IP' field.
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, ensure that only trusted users have access to the device editing functionality. Additionally, consider implementing input validation and sanitization on the 'overwrite_ip' parameter to mitigate the risk of XSS attacks until the package can be updated.
Conclusion
The CVE-2024-51495 vulnerability in LibreNMS poses a significant risk due to its potential for exploitation via Stored XSS attacks. It is crucial for users to update to the latest version to protect their systems and data. Implementing proper input validation and restricting access to sensitive functionalities can further mitigate risks until updates are applied.
See every vulnerability recorded for librenms/librenms →
FAQ
CVE-2024-51495 is a vulnerability in LibreNMS that allows authenticated users to execute arbitrary JavaScript code via a Stored XSS attack on the Device Overview page.
If exploited, this vulnerability can allow attackers to execute malicious scripts in the context of other users' sessions, potentially leading to account compromise and unauthorized actions.
Versions of LibreNMS prior to 24.10.0 are affected by this vulnerability. It is recommended to upgrade to the latest version to mitigate the risk.
Yes, you can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. You can check if your application is affected by visiting 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.