Ecosyste.ms: Advisories

An open API service providing security vulnerability metadata for many open source software ecosystems.

Security Advisories: GSA_kwCzR0hTQS1mcHE1LTR2d20tNzh4NM4AA3P3

LibreNMS has Broken Access control on Graphs Feature

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:-

Permalink: https://github.com/advisories/GHSA-fpq5-4vwm-78x4
JSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS1mcHE1LTR2d20tNzh4NM4AA3P3
Source: GitHub Advisory Database
Origin: Unspecified
Severity: Moderate
Classification: General
Published: 5 months ago
Updated: 5 months ago


CVSS Score: 4.3
CVSS vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N

Identifiers: GHSA-fpq5-4vwm-78x4, CVE-2023-48294
References: Repository: https://github.com/librenms/librenms
Blast Radius: 1.3

Affected Packages

packagist:librenms/librenms
Dependent packages: 1
Dependent repositories: 2
Downloads: 51,096 total
Affected Version Ranges: < 23.11.0
Fixed in: 23.11.0
All affected versions: 1.20.1, 1.22.1, 1.30.1, 1.31.1, 1.31.2, 1.31.3, 1.32.1, 1.33.1, 1.36.1, 1.42.1, 1.48.1, 1.50.1, 1.53.1, 1.58.1, 1.62.1, 1.62.2, 1.64.1, 1.65.1, 1.70.0, 1.70.1, 21.1.0, 21.2.0, 21.3.0, 21.4.0, 21.5.0, 21.5.1, 21.6.0, 21.7.0, 21.8.0, 21.9.0, 21.9.1, 21.10.0, 21.10.1, 21.10.2, 21.11.0, 21.12.0, 21.12.1, 22.1.0, 22.2.0, 22.2.1, 22.2.2, 22.3.0, 22.4.0, 22.4.1, 22.5.0, 22.6.0, 22.7.0, 22.8.0, 22.9.0, 22.10.0, 22.11.0, 22.12.0, 23.1.0, 23.1.1, 23.2.0, 23.4.0, 23.4.1, 23.5.0, 23.6.0, 23.7.0, 23.8.0, 23.8.1, 23.8.2, 23.9.0, 23.9.1, 23.10.0
All unaffected versions: 23.11.0, 24.1.0, 24.2.0, 24.3.0, 24.4.0, 24.4.1