Skip to content

LibreNMS Cross-site Scripting at Device groups Deletion feature

Moderate severity GitHub Reviewed Published Nov 17, 2023 in librenms/librenms • Updated Nov 17, 2023

Package

composer librenms/librenms (Composer)

Affected versions

< 23.11.0

Patched versions

23.11.0

Description

Summary

XSS attacks occurs when application is not sanitising inputs properly and rendering the code from user input to browser which could allow an attacker to execute malicious javascript code.

PoC

  1. Login
  2. Create a device group in /device-groups
  3. Name it as "><img src=x onerror=alert(1);>
  4. save it
  5. Go to services and create a service template and add that device group into that and save it
  6. After that go back to device groups and delete that device, you will see XSS payload popup in message

Screenshot 2023-11-08 at 9 15 56 PM

Vulnerable code:

https://github.com/librenms/librenms/blob/63eeeb71722237d1461a37bb6da99fda25e02c91/app/Http/Controllers/DeviceGroupController.php#L173C21-L173C21

Line 173 is not sanitizing device name properly
Screenshot 2023-11-08 at 9 26 14 PM

Impact

Cross site scripting can lead to cookie stealing attacks

References

@murrant murrant published to librenms/librenms Nov 17, 2023
Published by the National Vulnerability Database Nov 17, 2023
Published to the GitHub Advisory Database Nov 17, 2023
Reviewed Nov 17, 2023
Last updated Nov 17, 2023

Severity

Moderate

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
Low
User interaction
Required
Scope
Unchanged
Confidentiality
High
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:L/UI:R/S:U/C:H/I:L/A:N

EPSS score

0.064%
(30th percentile)

Weaknesses

CVE ID

CVE-2023-48295

GHSA ID

GHSA-8phr-637g-pxrg

Source code

Credits

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