{"id":"CVE-2024-50351","aliases":["CVE-2024-50351","GHSA-v7w9-63xh-6r3w"],"related":[],"kind":"vulnerability","state":"published","title":"LibreNMS has a Reflected XSS ('Cross-site Scripting') in librenms/includes/functions.php","summary":"LibreNMS is an open-source, PHP/MySQL/SNMP-based network monitoring system. A Reflected Cross-Site Scripting (XSS) vulnerability in the \"section\" parameter of the \"logs\" tab of a device allows attackers to inject arbitrary JavaScript. This vulnerability results in the execution of malicious code when a user accesses the page with a malicious \"section\" parameter, potentially compromising their session and enabling unauthorized actions. The issue arises from a lack of sanitization in the \"report_this()\" function. 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 \"section\" parameter of the \"logs\" tab of a device allows attackers to inject arbitrary JavaScript. This vulnerability results in the execution of malicious code when a user accesses the page with a malicious \"section\" parameter, potentially compromising their session and enabling unauthorized actions. The issue arises from a lack of sanitization in the \"report_this()\" function. This vulnerability is fixed in 24.10.0.","source":"cvelist"},{"lang":"en","text":"### Summary\nA Reflected Cross-Site Scripting (XSS) vulnerability in the \"section\" parameter of the \"logs\" tab of a device allows attackers to inject arbitrary JavaScript. This vulnerability results in the execution of malicious code when a user accesses the page with a malicious \"section\" parameter, potentially compromising their session and enabling unauthorized actions. The issue arises from a lack of sanitization in the \"report_this()\" function.\n\n### Details\nThe \"section\" parameter of the \"logs\" tab is vulnerable to reflected XSS. An attacker can inject the following XSS payload into the \"section\" parameter:\n```<script>constructor['constructor'](atob('Y29uZmlybShkb2N1bWVudC5kb21haW4p'))();<%2fscript>```\n\nWhen the page is loaded with this malicious parameter, the script executes immediately. This vulnerability occurs due to the lack of sanitization in the \"report_this()\" function. Other endpoints using this same function may also be vulnerable.\n\nThe vulnerable sink is located here:\nhttps://github.com/librenms/librenms/blob/7f2ae971c4a565b0d7345fa78b4211409f96800a/includes/functions.php#L523\nhttps://github.com/librenms/librenms/blob/7f2ae971c4a565b0d7345fa78b4211409f96800a/includes/html/pages/device/logs.inc.php#L93\n\n### PoC\n1. Inject the following payload into the \"section\" parameter of the \"logs\" tab:\n```<script>constructor['constructor'](atob('Y29uZmlybShkb2N1bWVudC5kb21haW4p'))();<%2fscript>```\n2. Access the page with the injected payload.\n3. Observe that the injected script executes when the page is loaded.\n\nExample URL: ```http://<your_url>/device/device=1/tab=logs/section=%3Cscript%3Econstructor['constructor'](atob('Y29uZmlybShkb2N1bWVudC5kb21haW4p'))();%3C%2fscript%3E/```\n\nExample Request:\n```http\nGET /device/device=1/tab=logs/section=%3Cscript%3Econstructor['constructor'](atob('Y29uZmlybShkb2N1bWVudC5kb21haW4p'))();%3C%2fscript%3E/ HTTP/1.1\nHost: <your_host>\nCookie: <your_cookie>\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 \"section\" de la pestaña \"logs\" de un dispositivo 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 \"section\" malicioso, lo que potencialmente compromete su sesión y permite acciones no autorizadas. El problema surge de una falta de limpieza en la función \"report_this()\". Esta vulnerabilidad se solucionó en 24.10.0.","source":"nvd"}],"published":"2024-11-15T15:34:36.000Z","modified":"2026-06-17T08:04:17.287Z","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-v7w9-63xh-6r3w","tags":["exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/librenms/librenms/commit/6a14a9bd767c6e452e4df77a24126c3eeb93dcbf","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-50351","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:19:51.836Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-50351","url":"https://www.cve.org/CVERecord?id=CVE-2024-50351","licence":"CVE Terms of Use","modified":"2024-11-15T17:20:43.440Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-v7w9-63xh-6r3w","url":"https://github.com/advisories/GHSA-v7w9-63xh-6r3w","licence":"CC-BY-4.0","modified":"2024-11-15T21:13:39.807Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-50351","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-50351","licence":"Public domain","modified":"2026-06-17T08:04:17.287Z"}],"updatedAt":"2026-11-25T22:58:48.302Z","epss":{"score":0.00426,"percentile":0.38794,"date":"2026-12-01T12:00:22.000Z"}}