CVE-2025-62412: Librenms/librenms Cross-Site Scripting Vulnerability

LOW
Advisory Identifier: GHSA-6g2v-66ch-6xmh
CVSS 3.8
CWE-79
Published
Advisory Summary

CVE-2025-62412 is a LOW (CVSS 3.8) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Librenms/librenms libraries in the Packagist ecosystem. The issue involves librenms alert-rules has a cross-site scripting vulnerability. Remediation is available by upgrading affected packages to version 25.10.0.

CVE-2025-62412 at a Glance

CVE Identifier CVE-2025-62412
GHSA Identifier GHSA-6g2v-66ch-6xmh
Severity LOW
CVSS v3.1 Base Score 3.8
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product Librenms/librenms
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 3.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:L/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required High (PR:H)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2025-62412

To remediate this vulnerability, upgrade all affected Librenms/librenms dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

librenms/librenms fixed: 25.10.0
Upgrade librenms/librenms to 25.10.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for librenms/librenms

How to Check if You Are Affected

To determine whether your application is affected by CVE-2025-62412, inspect your project dependencies for Librenms/librenms:

inspect dependencies for librenms/librenms

Analyze the terminal output to locate any version of Librenms/librenms in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 25.10.0), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Librenms/librenms, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## 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](https://trendmicro-my.sharepoint.com/:u:/p/kholoud_altookhy/EQYQOiGddUtOtz6739YUFU4B5FkNob_TvKBYEA8P6lSRQw?e=lDOR5W) **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: ```html &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 ```bash 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/

CVE-2025-62412 Affected Librenms/librenms Versions

1 component(s)
Fixed Versions:
25.10.0
Product / Package Ecosystem Affected Versions Fixed Version
librenms/librenms
Packagist
< 25.10.0
25.10.0

References

Frequently Asked Questions

What is CVE-2025-62412?
CVE-2025-62412 is a security vulnerability in Librenms/librenms involving LibreNMS alert-rules has a Cross-Site Scripting Vulnerability under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which Librenms/librenms versions are affected?
Affected versions include releases prior to 25.10.0 across affected packages: librenms/librenms.
What version fixes CVE-2025-62412?
Upgrading to 25.10.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is librenms/librenms affected?
Yes, librenms/librenms is affected in releases prior to 25.10.0. Upgrade your dependency to 25.10.0 or later.
What is the CVSS score of CVE-2025-62412?
CVE-2025-62412 has a CVSS v3.1 base score of 3.8 (LOW) with vector string CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:L/I:L/A:N.
What CWE is associated with CVE-2025-62412?
CVE-2025-62412 is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.).
How can I check Packagist dependencies for CVE-2025-62412?
Run the dependency tree command: 'inspect dependencies for librenms/librenms'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-6g2v-66ch-6xmh",
  "modified" : "2025-10-16T20:18:32Z",
  "published" : "2025-10-16T20:18:32Z",
  "aliases" : [ "CVE-2025-62412" ],
  "summary" : "LibreNMS alert-rules has a Cross-Site Scripting Vulnerability",
  "details" : "## Executive Summary\n\n**Product:** LibreNMS  \n**Vendor:** LibreNMS  \n**Vulnerability Type:** Cross-Site Scripting (XSS)  \n**CVSS Score:** 4.3 (AV:N/AC:L/PR:H/UI:R/S:U/C:L/I:L/A:L)  \n**Affected Version:** 25.8.0 (latest at time of discovery)  \n**POC File:** [Download POC](https://trendmicro-my.sharepoint.com/:u:/p/kholoud_altookhy/EQYQOiGddUtOtz6739YUFU4B5FkNob_TvKBYEA8P6lSRQw?e=lDOR5W)\n**Ticket:** ZDI-CAN-28105: LibreNMS Alert Rules Cross-Site Scripting Vulnerability\n\n## Vulnerability Details\n\n### Description\nTrend 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.\n\n### Technical Details\n\n**Version Tested:** 25.8.0  \n**Installer File:** 25.8.0.tar.gz  \n**Download Link:** https://github.com/librenms/librenms/archive/refs/tags/25.8.0.tar.gz  \n**Platform:** N/A\n\n### Attack Vector\nWhen 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.\n\n## Root Cause Analysis\n\n### Vulnerable Request\nWhen creating or updating an alert rule, the following HTTP POST request is sent to `/ajax_form.php`:\n\n ```\nPOST /ajax_form.php HTTP/1.1\n...\n\n_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=\n```\n\n### Code Flow\n\n1. **Request Processing:** PHP script `includes/html/forms/alert-rules.inc.php` processes the request\n2. **Sanitization Attempt:** Calls `strip_tags()` to sanitize the `name` parameter\n3. **Database Operation:** Calls `dbUpdate()` or `dbInsert()` to save the rule\n\n### Bypass Technique\nThe sanitization can be bypassed using XML character references:\n\n```html\n&lt;script>alert(1)&lt;/script>\n```\n\n### Execution Path\n\n1. **Page Load:** Victim browses to Alerts > Alert Rules page\n2. **Script Execution:** `includes/html/print-alert/rules.php` is called\n3. **Modal Inclusion:** Includes `includes/html/modal/alert_rule_list.inc.php` which returns HTML for modal window\n4. **Table Rendering:** Modal contains HTML table with all rules and inline JavaScript calling `bootgrid()` function\n5. **XSS Trigger:** The `bootgrid()` function (http://www.jquery-bootgrid.com/) rewrites table cells, decoding XML character references\n6. **Code Execution:** Browser interprets the decoded payload as HTML tags and executes the injected script\n\n## Proof of Concept\n\n### Usage\n```bash\npython3 poc.py client ip_addr -U <username> -P <password>\n```\n\n### Optional Parameters\n- `-E [kvp|multipart]` - Specify HTTP request parameter encoding\n\n## Credit\n\n**Discovered by:** Simon Humbert of Trend Research, Trend Micro\n\n## About Zero Day Initiative (ZDI)\n\nEstablished 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.\n\n## References\n\n- **ZDI Website:** http://www.zerodayinitiative.com\n- **Disclosure Policy:** http://www.zerodayinitiative.com/advisories/disclosure_policy/",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "librenms/librenms"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "25.10.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 25.8.0"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/librenms/librenms/security/advisories/GHSA-6g2v-66ch-6xmh"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-62412"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/librenms/librenms/commit/dccdf6769976a974d70f06a7ce8d5a846b29db6f"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/librenms/librenms"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/librenms/librenms/releases/tag/25.10.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-10-16T20:18:32Z",
    "nvd_published_at" : "2025-10-16T18:15:39Z"
  }
}