Skip to content

LibreNMS: Cross-Site Scripting in ShowConfigController

Low severity GitHub Reviewed Published May 12, 2026 in librenms/librenms

Package

composer librenms/librenms (Composer)

Affected versions

>= 25.12.0, < 26.3.0

Patched versions

26.3.0

Description

Summary

A Stored Cross-Site Scripting (XSS) vulnerability exists in the ShowConfig page of devices affected by the RANCID Integration settings. The application fails to properly sanitise the rancid_repo_url configuration value. When a user navigates to a device's configuration page, this unsanitised value is rendered directly within an HTML anchor (<a>) tag. This allows an authenticated user with permission to modify external settings to inject malicious JavaScript that will execute in the browser of any user viewing the affected device pages.

Details

The vulnerability is located in the external settings configuration block, specifically at the settings/external/rancid endpoint. When a valid rancid_configs is set, the application renders the corresponding rancid_repo_url as a clickable link labeled "Git Repository" on the /device/{id}/showconfig UI.

Because the rancid_repo_url input is neither validated upon saving nor contextually encoded upon rendering, an attacker can break out of the href attribute context or use JavaScript URIs to attach malicious event handlers or scripts.

This vulnerability is introduced by the line 13 of https://github.com/librenms/librenms/blob/master/includes/html/pages/device/showconfig.inc.php.

PoC

  1. Login as an admin and navigate to /settings/external/rancid.

image

  1. Add a valid path to rancid_configs. This can be any directory ended with .git.
  2. Put "></a><img/src/onerror=alert(1)><a x=" into rancid_repo_url config.

image

  1. Navigate to a device page and click Config (Or visit /device/{id}/showconfig directly).
  2. The XSS is triggered when visiting the page. It will pop up an alert dialog.

image

Other Payloads

  • javascript:alert(1)" x=" - triggered by clicking the link.
  • ``" onmouseover="alert(1)" x="` - triggered by hovering on the link

Impact

Since an admin account is required to change the settings, the risk is minimal in systems with a single administrator. However, in environments with multiple administrative users, this constitutes an Admin-to-Admin Cross-Site Scripting attack. It could be used by a compromised admin account to execute arbitrary frontend code in the context of another administrator's session, potentially leading to session hijacking or unauthorized data exposure.

Remediation Advice

Ensure proper sanitisation is performed on affected fields, with all special characters escaped and HTML encoded. This can be done with existing frameworks like HTMLPurifier.

CVE Request

CVE References: https://projectblack.io/blog/librenms-authenticated-rce-and-xss/

References

@murrant murrant published to librenms/librenms May 12, 2026
Published to the GitHub Advisory Database May 18, 2026
Reviewed May 18, 2026

Severity

Low

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
High
User interaction
Required
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:L/I:L/A:N

EPSS score

Exploit Prediction Scoring System (EPSS)

This score estimates the probability of this vulnerability being exploited within the next 30 days. Data provided by FIRST.
(0th percentile)

Weaknesses

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. Learn more on MITRE.

CVE ID

CVE-2026-2728

GHSA ID

GHSA-5gm9-622f-qcg5

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.