{"id":"CVE-2024-51496","aliases":["CVE-2024-51496","GHSA-28p7-f6h6-3jh3"],"related":[],"kind":"vulnerability","state":"published","title":"LibreNMS has a Reflected XSS ('Cross-site Scripting') in librenms/includes/html/pages/wireless.inc.php","summary":"LibreNMS is an open-source, PHP/MySQL/SNMP-based network monitoring system. A Reflected Cross-Site Scripting (XSS) vulnerability in the \"metric\" parameter of the \"/wireless\" and \"/health\" endpoints allows attackers to inject arbitrary JavaScript. This vulnerability results in the execution of malicious code when a user accesses the page with a malicious \"metric\" parameter, potentially compromising their session and allowing 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 Reflected Cross-Site Scripting (XSS) vulnerability in the \"metric\" parameter of the \"/wireless\" and \"/health\" endpoints allows attackers to inject arbitrary JavaScript. This vulnerability results in the execution of malicious code when a user accesses the page with a malicious \"metric\" parameter, potentially compromising their session and allowing unauthorized actions. This vulnerability is fixed in 24.10.0.","source":"cvelist"},{"lang":"en","text":"### Summary\nA Reflected Cross-Site Scripting (XSS) vulnerability in the \"metric\" parameter of the \"/wireless\" and \"/health\" endpoints allows attackers to inject arbitrary JavaScript. This vulnerability results in the execution of malicious code when a user accesses the page with a malicious \"metric\" parameter, potentially compromising their session and allowing unauthorized actions.\n\n### Details\nThe \"/wireless\" and \"/health\" endpoints are vulnerable to reflected XSS in the \"metric\" parameter. An attacker can inject the following XSS payload into the \"metric\" parameter:\n```<script>constructor['constructor'](atob('Y29uZmlybShkb2N1bWVudC5kb21haW4p'))();<!---->```\n\nWhen the page is loaded with this malicious parameter, the script executes immediately. The vulnerability occurs due to improper sanitization of the \"metric\" parameter in the following sinks:\nhttps://github.com/librenms/librenms/blob/7f2ae971c4a565b0d7345fa78b4211409f96800a/includes/html/pages/wireless.inc.php#L82\nhttps://github.com/librenms/librenms/blob/7f2ae971c4a565b0d7345fa78b4211409f96800a/includes/html/pages/health.inc.php#L114\n\n### PoC\n1. Inject the following payload into the \"metric\" parameter of the \"/wireless\" or \"/health\" endpoint:\n```<script>constructor['constructor'](atob('Y29uZmlybShkb2N1bWVudC5kb21haW4p'))();<!---->```\n2. Access the page with the injected payload.\n3. Observe that the injected script executes upon loading the page.\n\nExample URL: ```http://<your_url>/wireless/metric=%3Cscript%3Econstructor['constructor'](atob('Y29uZmlybShkb2N1bWVudC5kb21haW4p'))();%3C!----%3E```\n\nExample Request:\n```http\nGET /wireless/metric=%3Cscript%3Econstructor[%27constructor%27](atob(%27Y29uZmlybShkb2N1bWVudC5kb21haW4p%27))();%3C!----%3E HTTP/1.1\nHost: <your_host>\nCookie: <your cookies>\n```\n\n### Impact\n\nThis vulnerability allows attackers to execute arbitrary JavaScript in the context of a user’s session by crafting a malicious URL. The attack could lead to session hijacking, unauthorized actions, or further exploitation by injecting malicious scripts.","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 tipo cross site scripting (XSS) reflejado en el parámetro \"metric\" de los endpoints \"/wireless\" y \"/health\" permite a los atacantes inyectar código JavaScript arbitrario. Esta vulnerabilidad da como resultado la ejecución de código malicioso cuando un usuario accede a la página con un parámetro \"metric\" malicioso, lo que potencialmente compromete su sesión y permite acciones no autorizadas. Esta vulnerabilidad se corrigió en 24.10.0.","source":"nvd"}],"published":"2024-11-15T15:45:31.000Z","modified":"2026-06-17T08:05:48.307Z","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-28p7-f6h6-3jh3","tags":["exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/librenms/librenms/commit/aef739a438ffb507e927a4ec87b359164a7a053a","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-51496","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:18:15.598Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-51496","url":"https://www.cve.org/CVERecord?id=CVE-2024-51496","licence":"CVE Terms of Use","modified":"2024-11-15T17:19:08.596Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-28p7-f6h6-3jh3","url":"https://github.com/advisories/GHSA-28p7-f6h6-3jh3","licence":"CC-BY-4.0","modified":"2024-11-15T21:10:58.303Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-51496","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-51496","licence":"Public domain","modified":"2026-06-17T08:05:48.307Z"}],"updatedAt":"2026-11-25T22:58:48.306Z","epss":{"score":0.00443,"percentile":0.40304,"date":"2026-12-01T12:00:22.000Z"}}