CVE-2025-62412: LibreNMS alert-rules has a Cross-Site Scripting Vulnerability
Executive Summary Product: LibreNMS Vendor: LibreNMS Vulnerability Type: Cross-Site Scripting (XSS) CVSS Score: 4.3 (AV:N/AC:L/PR:H/UI:R/S:U/C:L/I:L/A:L) Affected Version: 25.8.0 (latest at time of discovery) POC File: Download POC Ticket: ZDI-CAN-28105: LibreNMS Alert Rules Cross-Site Scripting Vulnerability Vulnerability Details Description Trend Micro's Zero Day Initiative has identified a Cross-Site Scripting…
Published Oct 16, 2025
Affected packages
librenms/librenms
- Ecosystem
- Composer (PHP)
- Affected
- <= 25.8.0
- Fixed in
- 25.10.0
- Check
composer show librenms/librenms
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Executive Summary
Product: LibreNMS Vendor: LibreNMS Vulnerability Type: Cross-Site Scripting (XSS) CVSS Score: 4.3 (AV:N/AC:L/PR:H/UI:R/S:U/C:L/I:L/A:L) Affected Version: 25.8.0 (latest at time of discovery) POC File: Download POC Ticket: ZDI-CAN-28105: LibreNMS Alert Rules Cross-Site Scripting Vulnerability
Vulnerability Details
Description
Trend Micro's Zero Day Initiative has identified a Cross-Site Scripting vulnerability in LibreNMS. The vulnerability exists in the Alert Rules functionality where the alert rule name is not properly sanitized, allowing injection of HTML code.
Technical Details
Version Tested: 25.8.0 Installer File: 25.8.0.tar.gz Download Link: https://github.com/librenms/librenms/archive/refs/tags/25.8.0.tar.gz Platform: N/A
Attack Vector
When browsing to Alerts > Alert Rules page, a LibreNMS admin can add and manage alert rules. The alert rule name field is vulnerable to XSS attacks through improper sanitization.
Root Cause Analysis
Vulnerable Request
When creating or updating an alert rule, the following HTTP POST request is sent to /ajax_form.php:
POST /ajax_form.php HTTP/1.1
...
_token=9YjTntCuMIe2ujpumwqJQoENRXUhJzlDt33Xu7kx&device_id=-1&device_name=&rule_id=&type=alert-rules&template_id=&builder_json=%7B%22condition%22%3A%22AND%22%2C%22rules%22%3A%5B%7B%22id%22%3A%22access_points.accesspoint_id%22%2C%22field%22%3A%22access_points.accesspoint_id%22%2C%22type%22%3A%22string%22%2C%22input%22%3A%22text%22%2C%22operator%22%3A%22equal%22%2C%22value%22%3A%2242%22%7D%5D%2C%22valid%22%3Atrue%7D&name=%3Ci%3Efoo%3C%2Fi%3E&builder_rule_0_filter=access_points.accesspoint_id&builder_rule_0_operator=equal&builder_rule_0_value_0=42&severity=warning&count=1&delay=1m&interval=5m&recovery=on&acknowledgement=on&proc=¬es=&adv_query=Code Flow
- Request Processing: PHP script
includes/html/forms/alert-rules.inc.phpprocesses the request - Sanitization Attempt: Calls
strip_tags()to sanitize thenameparameter - Database Operation: Calls
dbUpdate()ordbInsert()to save the rule
Bypass Technique
The sanitization can be bypassed using XML character references:
<script>alert(1)</script>Execution Path
- Page Load: Victim browses to Alerts > Alert Rules page
- Script Execution:
includes/html/print-alert/rules.phpis called - Modal Inclusion: Includes
includes/html/modal/alert_rule_list.inc.phpwhich returns HTML for modal window - Table Rendering: Modal contains HTML table with all rules and inline JavaScript calling
bootgrid()function - XSS Trigger: The
bootgrid()function (http://www.jquery-bootgrid.com/) rewrites table cells, decoding XML character references - Code Execution: Browser interprets the decoded payload as HTML tags and executes the injected script
Proof of Concept
Usage
python3 poc.py client ip_addr -U <username> -P <password>Optional Parameters
-E [kvp|multipart]- Specify HTTP request parameter encoding
Credit
Discovered by: Simon Humbert of Trend Research, Trend Micro
About Zero Day Initiative (ZDI)
Established by TippingPoint and acquired by Trend Micro, the Zero Day Initiative (ZDI) neither re-sells vulnerability details nor exploit code. Instead, upon notifying the affected product vendor, the ZDI provides its Trend Micro TippingPoint customers with zero day protection through its intrusion prevention technology. Explicit details regarding the specifics of the vulnerability are not exposed to any parties until an official vendor patch is publicly available.
References
- ZDI Website: http://www.zerodayinitiative.com
- Disclosure Policy: http://www.zerodayinitiative.com/advisories/disclosure_policy/
Credited to zdi-disclosures.
References
- https://github.com/librenms/librenms/security/advisories/GHSA-6g2v-66ch-6xmh
- https://nvd.nist.gov/vuln/detail/CVE-2025-62412
- https://github.com/librenms/librenms/commit/dccdf6769976a974d70f06a7ce8d5a846b29db6f
- https://github.com/librenms/librenms/releases/tag/25.10.0
- https://github.com/advisories/GHSA-6g2v-66ch-6xmh
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More Composer (PHP) vulnerabilities
All Composer (PHP) entriesGHSA-7w8c-qgxg-m7jx
LibreNMS — Stored XSS via SNMP/Syslog Data in Legacy Templates
high7.1Aug 26, 2026CVE-2026-55182
LibreNMS Vulnerable to Remote Code Execution by Signal Alert Transportation module
high8.6Aug 18, 2026GHSA-7cj5-v4pp-v632
LibreNMS: Stored XSS via graph_descr admin config settings echoed without escaping to all authenticated users
medium4.8Aug 18, 2026GHSA-7gww-x7fh-jf9j
LibreNMS: SSRF-driven stored XSS via Oxidized API response fields in device showconfig page
high8.1Aug 18, 2026GHSA-jf24-8g2h-2wg7
LibreNMS Vulnerable to Remote Code Execution via AboutController
medium6.4Aug 18, 2026CVE-2026-45694
LibreNMS: Reflected XSS via Proxmox instance/vmid GET parameters injected into document.title JavaScript assignment
medium5.4Aug 12, 2026
