{"id":"CVE-2025-23199","aliases":["GHSA-27vf-3g4f-6jp7"],"url":"https://o3.security/vulnerability/CVE-2025-23199","summary":"Stored XSS-LibreNMS-Ports in librenms","details":"# StoredXSS-LibreNMS-Ports\n\n\n**Description:**\n\n\nStored XSS on the parameter:\n`/ajax_form.php` -> param: descr\n\nRequest:\n```http\nPOST /ajax_form.php HTTP/1.1\nHost: <your_host>\nX-Requested-With: XMLHttpRequest\nX-CSRF-TOKEN: <your_XSRF_token>\nContent-Type: application/x-www-form-urlencoded; charset=UTF-8\nCookie: <your_cookie>\n\ntype=update-ifalias&descr=%22%3E%3Cimg+src+onerror%3D%22alert(1)%22%3E&ifName=lo&port_id=1&device_id=1\n```\n\n\nof Librenms version 24.10.1 ([https://github.com/librenms/librenms](https://github.com/librenms/librenms)) allows remote attackers to inject malicious scripts. When a user views or interacts with the page displaying the data, the malicious script executes immediately, leading to potential unauthorized actions or data exposure.\n\n\n\n**Proof of Concept:**\n1. Add a new device through the LibreNMS interface.\n2. Edit the newly created device and select the \"ports\" section.\n3. In the \"Description\" field, enter the following payload: `\"><img src onerror=\"alert(1)\">`.\n4. Save the changes.\n5. The XSS vulnerability is triggered when accessing the \"ports\" tab, and the payload is executed again when hovering over the modified value in the \"Port\" field.\n\nPayload:\n![payload](https://github.com/user-attachments/assets/2f38b985-6684-403f-9d1f-e405f09a75bb)\n\nExecutes:\n![image](https://github.com/user-attachments/assets/b70a6e34-d52c-4113-b769-4e271e33de88)\nThe script execution vulnerability in the description field, as shown in the image, occurs at [Line 63 of functions.inc.php](https://github.com/librenms/librenms/blob/master/includes/html/functions.inc.php#L63)\n```php\n$overlib_content = '<div class=overlib><span class=overlib-text>' . $text . '</span><br />';\n```\n\n![image](https://github.com/user-attachments/assets/97b85403-5b7e-4f43-932c-d33bd3c0f73f)\n\n\n\n\n**Impact:**\n\nExecution of Malicious Code","published":"2025-01-16T22:23:48.323Z","modified":"2026-08-12T03:51:20.674486754Z","cvss":{"score":4.6,"severity":"MEDIUM","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N"},"epss":null,"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"Packagist","name":"librenms/librenms","fixedVersion":"24.11.0"}],"fix":{"url":"https://github.com/librenms/librenms/pull/16721","label":"librenms/librenms#16721"},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/23xxx/CVE-2025-23199.json"},{"type":"ADVISORY","url":"https://github.com/librenms/librenms/security/advisories/GHSA-27vf-3g4f-6jp7"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-23199"},{"type":"WEB","url":"https://github.com/librenms/librenms/pull/16721"},{"type":"WEB","url":"https://github.com/librenms/librenms/commit/9d07d166b87634091dcf21c62b28f9b42a3118c4"},{"type":"PACKAGE","url":"https://github.com/librenms/librenms"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-12T03:51:20.674486754Z"}}