CVE-2023-48294: Librenms/librenms LibreNMS Has Broken Access Control Vulnerability

MODERATE
Advisory Identifier: GHSA-fpq5-4vwm-78x4
CVSS 4.3
CWE-200
Published
Advisory Summary

CVE-2023-48294 is a MODERATE (CVSS 4.3) librenms has broken access control vulnerability (CWE-200: Exposure of Sensitive Information to an Unauthorized Actor) affecting Librenms/librenms libraries in the Packagist ecosystem. The issue involves librenms has broken access control on graphs feature. Remediation is available by upgrading affected packages to version 23.11.0.

CVE-2023-48294 at a Glance

CVE Identifier CVE-2023-48294
GHSA Identifier GHSA-fpq5-4vwm-78x4
Severity MODERATE
CVSS v3.1 Base Score 4.3
CWE Classification CWE-200: Exposure of Sensitive Information to an Unauthorized Actor
Affected Product Librenms/librenms
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 4.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2023-48294

To remediate this vulnerability, upgrade all affected Librenms/librenms dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

librenms/librenms fixed: 23.11.0
Upgrade librenms/librenms to 23.11.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for librenms/librenms

How to Check if You Are Affected

To determine whether your application is affected by CVE-2023-48294, inspect your project dependencies for Librenms/librenms:

inspect dependencies for librenms/librenms

Analyze the terminal output to locate any version of Librenms/librenms in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 23.11.0), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor, where the product exposes sensitive information to an actor that is not explicitly authorized to have access to that information. In Librenms/librenms, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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:- <img width="967" alt="Screenshot 2023-11-04 at 8 31 15 PM" src="https://user-images.githubusercontent.com/31764504/281085588-1c5d81b9-83d7-4ba8-baf3-03c95a99cefe.png"> <img width="973" alt="Screenshot 2023-11-04 at 8 31 36 PM" src="https://user-images.githubusercontent.com/31764504/281085614-7a4d13b0-d316-4d24-bdd2-05c3a80ffd59.png"> <img width="955" alt="Screenshot 2023-11-04 at 8 31 48 PM" src="https://user-images.githubusercontent.com/31764504/281085629-43aa2b6f-7b18-415f-8001-519bda45f918.png">

CVE-2023-48294 Affected Librenms/librenms Versions

1 component(s)
Fixed Versions:
23.11.0
Product / Package Ecosystem Affected Versions Fixed Version
librenms/librenms
Packagist
< 23.11.0
23.11.0

References

Frequently Asked Questions

What is CVE-2023-48294?
CVE-2023-48294 is a security vulnerability in Librenms/librenms involving LibreNMS has Broken Access control on Graphs Feature under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor.
Which Librenms/librenms versions are affected?
Affected versions include releases prior to 23.11.0 across affected packages: librenms/librenms.
What version fixes CVE-2023-48294?
Upgrading to 23.11.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is librenms/librenms affected?
Yes, librenms/librenms is affected in releases prior to 23.11.0. Upgrade your dependency to 23.11.0 or later.
What is the CVSS score of CVE-2023-48294?
CVE-2023-48294 has a CVSS v3.1 base score of 4.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N.
What CWE is associated with CVE-2023-48294?
CVE-2023-48294 is classified under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor (The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.).
How can I check Packagist dependencies for CVE-2023-48294?
Run the dependency tree command: 'inspect dependencies for librenms/librenms'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-fpq5-4vwm-78x4",
  "modified" : "2023-11-20T22:06:40Z",
  "published" : "2023-11-17T21:51:57Z",
  "aliases" : [ "CVE-2023-48294" ],
  "summary" : "LibreNMS has Broken Access control on Graphs Feature",
  "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&height=45&device=1&type=device_ping_perf&from=1699022192&legend=no&bg=FFFFFF00&popup_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&height=45&device=127.0.0.1&type=device_ping_perf&from=1699022192&legend=no&bg=FFFFFF00&popup_title=ICMP+Response\n\n5. If device hostname doesn't 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<img width=\"967\" alt=\"Screenshot 2023-11-04 at 8 31 15 PM\" src=\"https://user-images.githubusercontent.com/31764504/281085588-1c5d81b9-83d7-4ba8-baf3-03c95a99cefe.png\">\n<img width=\"973\" alt=\"Screenshot 2023-11-04 at 8 31 36 PM\" src=\"https://user-images.githubusercontent.com/31764504/281085614-7a4d13b0-d316-4d24-bdd2-05c3a80ffd59.png\">\n<img width=\"955\" alt=\"Screenshot 2023-11-04 at 8 31 48 PM\" src=\"https://user-images.githubusercontent.com/31764504/281085629-43aa2b6f-7b18-415f-8001-519bda45f918.png\">\n\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "librenms/librenms"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "23.11.0"
      } ]
    } ]
  } ],
  "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"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-200" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-11-17T21:51:57Z",
    "nvd_published_at" : "2023-11-17T22:15:08Z"
  }
}