/

CVE-2026-84192

Severity:

HIGH RISK

(7.1)

Stored XSS (CWE-79) in LibreNMS Legacy PHP Templates

CVE-2026-84192

Deferred

Vulnerability type

Category:

Stored Cross-Site Scripting

CWE:

CWE-79

Impact:

Authenticated user session compromise and unauthorized actions

Severity:

HIGH RISK

(7.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

LibreNMS before 26.3.1 contains a stored cross-site scripting vulnerability in legacy PHP templates that render SNMP- and syslog-sourced values without adequate output escaping. An attacker who controls a monitored network device may inject JavaScript that executes when an authenticated user views an affected page.

Affected context

The vulnerability occurs in LibreNMS deployments that use legacy PHP templates to display data received from monitored network devices. It becomes risky when a device or its management interface can be controlled by an attacker, and when authenticated users view pages containing unescaped SNMP interface descriptions or syslog program fields.

Exploit preconditions

  • Attack surface: Web pages rendered by legacy LibreNMS PHP templates
  • Required access: Ability to control or influence a monitored network device, including values reported through SNMP or syslog
  • Trigger point: An authenticated user views an affected LibreNMS page
  • Why exploitation is possible: Device-sourced values are inserted into HTML without context-appropriate output encoding, allowing stored script content to be interpreted by the browser

Why this happens

The underlying bug is improper neutralization of user-controllable data in web output, mapping to CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'). Legacy templates treat SNMP- and syslog-derived values as trusted display data instead of encoding them for their output context, allowing embedded markup or script content to persist and execute in users' browsers.

Potential impact

  • An attacker may execute JavaScript in the context of an authenticated LibreNMS session
  • The vulnerability could expose data available to the affected user
  • An attacker may perform unauthorized actions through the victim's browser
  • Administrative users could experience greater impact if they view the affected content

General mitigation guidance

Mitigation generally focuses on making output encoding the default for every untrusted value rendered by the application.

Common defensive patterns include:

  • Apply context-appropriate HTML, attribute, URL, or JavaScript encoding at the final output point
  • Treat SNMP, syslog, device metadata, and other externally sourced values as untrusted
  • Prefer templating systems with automatic escaping enabled by default
  • Restrict administrative privileges and separate monitoring roles from high-impact management roles
  • Use a restrictive Content Security Policy as defense in depth
  • Avoid rendering raw HTML unless it is explicitly required and safely sanitized

How teams detect issues like this

Organizations can identify similar issues through:

  • Static analysis rules for unescaped variables in PHP templates
  • Code review checks tracing SNMP and syslog data from ingestion to HTML output
  • Tests that insert harmless marker characters into device-sourced fields and verify correct encoding
  • Policy enforcement requiring automatic template escaping or approved sanitization libraries
  • Browser-based security testing focused on pages displaying externally controlled monitoring data

Automated code review and security scanning tools may help identify missing output encoding, but findings should be validated against the relevant rendering context.

Sources

SourceLink
github.comgithub.com/librenms/librenms/security/advisories/GHSA-7w8c-qgxg-m7jx
vulncheck.comvulncheck.com/advisories/librenms-before-26.3.1-stored-xss-via-snmp-syslog-data

Frequently asked

questions

It may be exploitable through a monitored device or management path if an attacker can cause malicious values to be reported to LibreNMS. User interaction is generally required because an authenticated user must view the affected page.

The attacker may not need a LibreNMS account if they can control a monitored device, but the impact depends on an authenticated LibreNMS user viewing the stored content.

Encode all externally sourced values at the point where they are rendered, using the correct encoding for the output context, and avoid raw template output by default.

Treat monitoring data as untrusted, use auto-escaping templates, review data flows into web pages, apply least privilege, and include cross-site scripting tests in CI and security review processes.

Find out what's already
exploitable in your codebase.