CVE-2023-4979: LibreNMS Cross-site Scripting vulnerability
5.4
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.15723%
CWE
Published
9/15/2023
Updated
11/11/2023
KEV Status
No
Technology
PHP
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| librenms/librenms | composer | < 23.9.0 | 23.9.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from improper output escaping in the outages page. The commit diff shows the replacement of addcslashes with htmlspecialchars for the 'to' and 'from' parameters. addcslashes is insufficient for XSS prevention in HTML/JS contexts because it does not encode critical characters like <, >, &, etc. The use of htmlspecialchars in the patch confirms the root cause was improper escaping during output generation. The vulnerable code resided in the JavaScript configuration section of outages.inc.php, where user-controlled 'to' and 'from' parameters were insufficiently sanitized.