CVE-2025-62412

CVE-2025-62412 is a low-severity cross-site scripting (XSS) vulnerability in librenms/librenms (composer), affecting versions <= 25.8.0. It is fixed in 25.10.0.

Summary

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=&notes=&adv_query=

Code Flow

  1. Request Processing: PHP script includes/html/forms/alert-rules.inc.php processes the request
  2. Sanitization Attempt: Calls strip_tags() to sanitize the name parameter
  3. Database Operation: Calls dbUpdate() or dbInsert() to save the rule

Bypass Technique

The sanitization can be bypassed using XML character references:

&lt;script>alert(1)&lt;/script>

Execution Path

  1. Page Load: Victim browses to Alerts > Alert Rules page
  2. Script Execution: includes/html/print-alert/rules.php is called
  3. Modal Inclusion: Includes includes/html/modal/alert_rule_list.inc.php which returns HTML for modal window
  4. Table Rendering: Modal contains HTML table with all rules and inline JavaScript calling bootgrid() function
  5. XSS Trigger: The bootgrid() function (http://www.jquery-bootgrid.com/) rewrites table cells, decoding XML character references
  6. 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

Impact

Untrusted input is rendered as active markup in a victim's browser, which can run script in their session. Typical impact: session or credential theft, and actions taken as the user.

CVE-2025-62412 has a CVSS score of 3.8 (Low). The vector is network-reachable, high privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (25.10.0); upgrading removes the vulnerable code path.

Affected versions

librenms/librenms (<= 25.8.0)

Security releases

librenms/librenms → 25.10.0 (composer)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

See it in your environment

Remediation advice

Upgrade librenms/librenms to 25.10.0 or later to resolve this vulnerability.

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently Asked Questions

  1. What is CVE-2025-62412? CVE-2025-62412 is a low-severity cross-site scripting (XSS) vulnerability in librenms/librenms (composer), affecting versions <= 25.8.0. It is fixed in 25.10.0. Untrusted input is rendered as active markup in a victim's browser, which can run script in their session.
  2. How severe is CVE-2025-62412? CVE-2025-62412 has a CVSS score of 3.8 (Low). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which versions of librenms/librenms are affected by CVE-2025-62412? librenms/librenms (composer) versions <= 25.8.0 is affected.
  4. Is there a fix for CVE-2025-62412? Yes. CVE-2025-62412 is fixed in 25.10.0. Upgrade to this version or later.
  5. Is CVE-2025-62412 exploitable, and should I be worried? Whether CVE-2025-62412 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2025-62412 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2025-62412? Upgrade librenms/librenms to 25.10.0 or later.

Other vulnerabilities in librenms/librenms

CVE-2026-6204CVE-2026-26990CVE-2026-26989CVE-2026-26988CVE-2026-27016

Stop the waste.
Protect your environment with Kodem.