LibreNMS allows stored XSS in Alert Template name field
Summary
A stored Cross-Site Scripting (XSS) vulnerability exists in LibreNMS (<= 25.6.0) in the Alert Template creation feature. This allows a user with the admin role to inject malicious JavaScript, which will be executed when the template is rendered, potentially compromising other admin accounts.
Details
In the LibreNMS web UI, when a user with the admin role visits /templates and clicks "Create new alert template", the "Template name" field fails to properly sanitize input. By inserting a payload like:
<script>alert(document.cookie)</script>
and filling the other fields with arbitrary content (e.g., test), once the template is saved, the script is executed. This confirms that user input is stored and later rendered without proper output encoding.
This vulnerability can be exploited for session hijacking, data theft, or other malicious actions targeting other admin users.
PoC
-
Log in to LibreNMS using an account with the admin role.
-
Navigate to:
http://localhost:8000/templates. -
Click the "Create new alert template" button.
-
Input the following into the Template name field:
<script>alert(document.cookie)</script> -
Fill the remaining fields (
Template,Alert title,Recovery title) with arbitrary content such astest. -
Click "Create template".
-
Upon saving, a JavaScript alert pops up, confirming the stored XSS is triggered. <img width="1574" height="848" alt="image" src="https://github.com/user-attachments/assets/bc482874-c47e-48e3-83b6-cb4a9dcf4a53" />
Impact
Type: Stored Cross-Site Scripting (XSS)
Affected users: Only accounts with the admin role who access the Alert Templates page (http://localhost:8000/templates) are affected.
Attackers need: Authenticated admin-level access.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| Composer package | librenms/librenms | < 25.8.0 | 25.8.0 |
References
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:L/I:L/A:N- Weakness (CWE)
CWE-79- Platform
- Composer
- Package
librenms/librenms- Disclosed
- 18.08.2025
- Updated
- 11.10.2026 10:22
Sources and licenses
OSV / GitHub Advisory Database - GHSA-vxq6-8cwm-wj99 - CC BY 4.0
Vulnerability history: librenms/librenms
All published vulnerabilities of this package (Composer package), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 106
- First → latest
- 10.2019 08.2026
- Without a fix
- 6
- Exploited in attacks
- 0
Severity breakdown
- Critical 5
- High 39
- Medium 56
- Low 6
Disclosures per year
- 2019: 6
- 2020: 0
- 2021: 7
- 2022: 26
- 2023: 12
- 2024: 24
- 2025: 15
- 2026: 16
-
LibreNMS allows stored XSS in Alert Template name field this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.