Skip to content

LibreNMS has Broken Access control on Graphs Feature

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

Package

composer librenms/librenms (Composer)

Affected versions

< 23.11.0

Patched versions

23.11.0

Description

Summary

This vulnerability occurs when application is not checking access of each type of users as per their role and it autorizing the users to access any feature. When user access his Device dashboard in librenms, one request is going to graph.php to access image of graphs generated on the particular Device. This request can be accessed by lower privileged users as well and they can enumerate devices on librenms with their id or hostname.

Details

Give all details on the vulnerability. Pointing to the incriminated source code is very helpful for the maintainer.

PoC

  1. Login with Lower privilege user

  2. Go to /graph.php?width=150&height=45&device=1&type=device_ping_perf&from=1699022192&legend=no&bg=FFFFFF00&popup_title=ICMP+Response

  3. If its showing image with "device*ping_perf" which confirms that there is device with id 1

  4. Now you can change device parameter in above URL with hostname to check if that Hostname/IP exist or not like
    http://127.0.0.1:8000/graph.php?width=150&height=45&device=127.0.0.1&type=device_ping_perf&from=1699022192&legend=no&bg=FFFFFF00&popup_title=ICMP+Response

  5. If device hostname doesn't exist then it should show 500 error

Check attached screenshots for more info

Vulnerable code:
https://github.com/librenms/librenms/blob/fa93034edd40c130c2ff00667ca2498d84be6e69/html/graph.php#L19C1-L25C2

Above is vulnerable line of code from Line number 19-25
This is not checking privilege of users to access any device hostname, its just checking if user is authenticated
or not

Impact

Low privilege users can see all devices registered by admin users by using this method

Solution

Implement privilege access control feature to check if low privilege user have access or not.

Screenshots:-

Screenshot 2023-11-04 at 8 31 15 PM

Screenshot 2023-11-04 at 8 31 36 PM

Screenshot 2023-11-04 at 8 31 48 PM

References

@murrant murrant published to librenms/librenms Nov 17, 2023
Published to the GitHub Advisory Database Nov 17, 2023
Reviewed Nov 17, 2023
Published by the National Vulnerability Database Nov 17, 2023
Last updated Nov 20, 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
None
Scope
Unchanged
Confidentiality
Low
Integrity
None
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:N/S:U/C:L/I:N/A:N

EPSS score

0.058%
(25th percentile)

Weaknesses

CVE ID

CVE-2023-48294

GHSA ID

GHSA-fpq5-4vwm-78x4

Source code

Credits

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