GHSA-FPQ5-4VWM-78X4
Vulnerability from github – Published: 2023-11-17 21:51 – Updated: 2023-11-20 22:06Summary
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
- Login with Lower privilege user
- Go to /graph.php?width=150&height=45&device=1&type=device_ping_perf&from=1699022192&legend=no&bg=FFFFFF00&popup_title=ICMP+Response
- If its showing image with "device*ping_perf" which confirms that there is device with id 1
-
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
-
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:-

{
"affected": [
{
"package": {
"ecosystem": "Packagist",
"name": "librenms/librenms"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "23.11.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2023-48294"
],
"database_specific": {
"cwe_ids": [
"CWE-200"
],
"github_reviewed": true,
"github_reviewed_at": "2023-11-17T21:51:57Z",
"nvd_published_at": "2023-11-17T22:15:08Z",
"severity": "MODERATE"
},
"details": "### Summary\nThis 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.\n\n### Details\n_Give all details on the vulnerability. Pointing to the incriminated source code is very helpful for the maintainer._\n\n### PoC\n1. Login with Lower privilege user\n2. Go to /graph.php?width=150\u0026height=45\u0026device=1\u0026type=device_ping_perf\u0026from=1699022192\u0026legend=no\u0026bg=FFFFFF00\u0026popup_title=ICMP+Response\n3. If its showing image with \"device*ping_perf\" which confirms that there is device with id 1\n4. Now you can change device parameter in above URL with hostname to check if that Hostname/IP exist or not like\nhttp://127.0.0.1:8000/graph.php?width=150\u0026height=45\u0026device=127.0.0.1\u0026type=device_ping_perf\u0026from=1699022192\u0026legend=no\u0026bg=FFFFFF00\u0026popup_title=ICMP+Response\n\n5. If device hostname doesn\u0027t exist then it should show 500 error\n\nCheck attached screenshots for more info\n\nVulnerable code:\nhttps://github.com/librenms/librenms/blob/fa93034edd40c130c2ff00667ca2498d84be6e69/html/graph.php#L19C1-L25C2\n\nAbove is vulnerable line of code from Line number 19-25\nThis is not checking privilege of users to access any device hostname, its just checking if user is authenticated \nor not\n\n\n### Impact\nLow privilege users can see all devices registered by admin users by using this method\n\n### Solution\nImplement privilege access control feature to check if low privilege user have access or not.\n\n### Screenshots:-\n\u003cimg width=\"967\" alt=\"Screenshot 2023-11-04 at 8 31 15\u202fPM\" src=\"https://user-images.githubusercontent.com/31764504/281085588-1c5d81b9-83d7-4ba8-baf3-03c95a99cefe.png\"\u003e\n\u003cimg width=\"973\" alt=\"Screenshot 2023-11-04 at 8 31 36\u202fPM\" src=\"https://user-images.githubusercontent.com/31764504/281085614-7a4d13b0-d316-4d24-bdd2-05c3a80ffd59.png\"\u003e\n\u003cimg width=\"955\" alt=\"Screenshot 2023-11-04 at 8 31 48\u202fPM\" src=\"https://user-images.githubusercontent.com/31764504/281085629-43aa2b6f-7b18-415f-8001-519bda45f918.png\"\u003e\n\n",
"id": "GHSA-fpq5-4vwm-78x4",
"modified": "2023-11-20T22:06:40Z",
"published": "2023-11-17T21:51:57Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/librenms/librenms/security/advisories/GHSA-fpq5-4vwm-78x4"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-48294"
},
{
"type": "WEB",
"url": "https://github.com/librenms/librenms/commit/489978a923ed52aa243d3419889ca298a8a6a7cf"
},
{
"type": "PACKAGE",
"url": "https://github.com/librenms/librenms"
},
{
"type": "WEB",
"url": "https://github.com/librenms/librenms/blob/fa93034edd40c130c2ff00667ca2498d84be6e69/html/graph.php#L19C1-L25C2"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N",
"type": "CVSS_V3"
}
],
"summary": "LibreNMS has Broken Access control on Graphs Feature"
}
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.