highCVSS 7.1Vulnerability

GHSA-7w8c-qgxg-m7jx

## Summary Multiple legacy PHP template files in LibreNMS directly output SNMP-sourced and syslog-sourced data into HTML without escaping. An attacker who controls a monitored network device (via compromised SNMP agent or syslog sender) can inject arbitrary JavaScript that executes when any authenticated LibreNMS user views the affected pages. ## Vulnerable Code ### Location 1: Syslog `program` field (clearest instance) **File:** `includes/html/print-syslog.inc.php:11,13` ```php $syslog_output .= '<td><strong>' . $entry['program'] . ' : </strong> ' . htmlspecialchars((string) $entry['msg']) . '</td>'; ``` The `program` field is output without `htmlspecialchars()` while the adjacent `msg` field IS properly escaped. The `program` value comes from syslog messages received from monitored devices. ### Location 2: Alert details `ifAlias` (highest impact — main alerts page) **File:** `includes/html/functions.inc.php:607` ```php $fault_detail .= $tmp_alerts['ifAlias'] . '; '; ``` The `ifAlias` (port description) comes from SNMP polling and is stored in the `ports` table. When a port-related alert fires, `format_alert_details()` renders it unescaped. Multiple other fields in this function are also unescaped: `isisISAdjIPAddrAddress` (line 598), `service_desc`/`service_message` (lines 656,658), `bgpPeerDescr` (line 672), `mempool_descr` (line 686), `app_type` (line 709). ### Location 3: Health pages — `mempool_descr`, `storage_descr`, `sensor_descr` **File:** `includes/html/pages/device/health/mempool.inc.php:38` ```php echo "<h3 class='panel-title'>{$mempool->mempool_descr} ..."; ``` **File:** `includes/html/pages/device/health/storage.inc.php:27` ```php echo "<h3 class='panel-title'>{$drive['storage_descr']} ..."; ``` **File:** `includes/html/pages/device/health/sensors.inc.php:29` ```php echo "<h3 class='panel-title'>$sensor_descr ..."; ``` All three health page templates output SNMP-polled descriptions directly into `<h3>` tags without escaping. ### Locati

Properties

ghsa_id
GHSA-7w8c-qgxg-m7jx
severity
high
summary
LibreNMS — Stored XSS via SNMP/Syslog Data in Legacy Templates
cvss_score
7.1
cve_id
GHSA-7w8c-qgxg-m7jx
cvss_vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N
is_ghsa_only
true
ghsa_published
2026-08-26T18:05:46Z
source_url
https://github.com/advisories/GHSA-7w8c-qgxg-m7jx
ghsa_updated
2026-08-26T18:05:47Z

Related Entities (4)

VULNERABLE_TO (1)

[Software]composer/librenms/librenms

AFFECTS (1)

[Software]composer/librenms/librenms

HAS_WEAKNESS (1)

[Weakness]Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

REPORTED_BY (1)

[Source]GitHub Advisory Database

Explore deeper with Ninja Signal's threat intelligence graph

GHSA-7w8c-qgxg-m7jx (CVSS 7.1) — Ninja Signal Threat Intelligence | Ninja Signal