Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2025-55296 Overview
CVE-2025-55296 is a stored Cross-Site Scripting (XSS) vulnerability in LibreNMS, a community-based GPL-licensed network monitoring system. The flaw affects LibreNMS versions up to and including 25.6.0 in the Alert Template creation feature. An authenticated user with the admin role can inject malicious JavaScript into an alert template name. The payload executes when the template is rendered in the admin interface, which can compromise other admin sessions. The vulnerability is tracked under CWE-79 and is fixed in LibreNMS 25.8.0.
Critical Impact
An authenticated admin can store JavaScript in alert templates that executes against other administrators, enabling session theft, action-on-behalf, and lateral compromise of the monitoring platform.
Affected Products
- LibreNMS versions <= 25.6.0
- LibreNMS Alert Template creation feature (includes/html/forms/parse-alert-template.inc.php)
- LibreNMS Alert Template rendering (includes/html/print-alert-templates.php)
Discovery Timeline
- 2025-08-18 - CVE-2025-55296 published to NVD
- 2026-06-17 - Last updated in NVD database
Technical Details for CVE-2025-55296
Vulnerability Analysis
The vulnerability is a stored XSS in the LibreNMS Alert Template workflow. User-supplied values submitted to the Alert Template creation form are persisted to the database without sanitization. When the templates list is rendered, the stored name and alert_rules fields are emitted directly into HTML, allowing any JavaScript contained in those fields to execute in the browser of the viewing administrator.
Because execution occurs inside an authenticated admin session, an attacker can issue requests against the LibreNMS web interface as the victim. This includes creating or modifying users, altering alert configurations, and exfiltrating session data to attacker-controlled infrastructure.
Root Cause
The root cause is missing output encoding in the alert template rendering path. The pre-patch code echoed $template['name'] and json_encode($template['alert_rules']) directly into table cells without passing them through htmlspecialchars(). Any HTML or script tags stored in those fields were interpreted by the browser rather than displayed as text.
Attack Vector
Exploitation requires an authenticated account with the admin role and user interaction from a second administrator who views the alert templates page. The attacker creates an alert template whose name contains a JavaScript payload, for example embedded in a <script> tag or an event handler attribute. The payload is stored and later executed in every admin browser that loads the templates listing.
// Pre-patch (vulnerable) rendering in includes/html/print-alert-templates.php
echo '<tr data-row-id="' . $template['id'] . '">
<td>' . $template['id'] . '</td>
<td>' . $template['name'] . '</td>
<td>' . json_encode($template['alert_rules']) . '</td>
<td>' . $old_template . '</td>
</tr>';
// Post-patch (fixed) rendering
echo '<tr data-row-id="' . $template['id'] . '">
<td>' . $template['id'] . '</td>
<td>' . htmlspecialchars($template['name']) . '</td>
<td>' . htmlspecialchars(json_encode($template['alert_rules'])) . '</td>
<td>' . $old_template . '</td>
</tr>';
// Source: https://github.com/librenms/librenms/commit/8ade3d827d317f5ac4b336617aafff865f825958
Detection Methods for CVE-2025-55296
Indicators of Compromise
- Alert template records whose name field contains HTML tags, <script>, onerror=, onload=, or javascript: substrings.
- Unexpected administrative actions (user creation, permission changes) correlated with admin visits to the alert templates page.
- Outbound HTTP requests from admin browsers to unknown hosts shortly after loading /alerts/templates.
Detection Strategies
- Query the alert_templates database table for name values matching %<% or %javascript:% and review manually.
- Review LibreNMS web server access logs for POST requests to the alert template creation endpoint followed by immediate template rendering by other admins.
- Inspect browser Content Security Policy (CSP) violation reports, if CSP is deployed, for inline script execution originating from LibreNMS pages.
Monitoring Recommendations
- Audit LibreNMS admin role membership and reduce the number of accounts with template creation privileges.
- Enable and ship web server and application logs to a centralized logging platform for correlation of admin actions.
- Alert on new admin user creation, API token generation, or role changes performed from the LibreNMS web UI.
How to Mitigate CVE-2025-55296
Immediate Actions Required
- Upgrade LibreNMS to version 25.8.0 or later, which contains the fix from commit 8ade3d8.
- Review all existing alert templates and delete or sanitize any name field containing HTML or script content.
- Rotate session cookies and API tokens for all admin accounts if malicious templates are discovered.
Patch Information
The fix is published in the LibreNMS GitHub Security Advisory GHSA-vxq6-8cwm-wj99 and merged in commit 8ade3d8. The patch wraps $template['name'] and json_encode($template['alert_rules']) with htmlspecialchars() in includes/html/print-alert-templates.php and removes the unused type key from the template form parser.
Workarounds
- Restrict admin role assignment to the minimum set of trusted users until the upgrade is applied.
- Deploy a strict Content Security Policy that disallows inline scripts on LibreNMS pages to limit payload execution.
- Place LibreNMS behind a web application firewall and block requests to the alert template endpoints containing <script> or event handler patterns.
# Upgrade LibreNMS to the fixed release
cd /opt/librenms
sudo -u librenms git fetch --tags
sudo -u librenms git checkout 25.8.0
sudo -u librenms ./daily.sh
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

