CVE-2025-47931: LibreNMS stored Cross-site Scripting vulnerability in poller group name
2.1
Basic Information
Technical Details
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
librenms/librenms | composer | < 25.5.0 | 25.5.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability is a stored XSS where the 'group name' from poller groups is rendered unsanitized on the 'addhost' page. The provided commit 009d79ff9126ed5e01a2f0e619bd6fb252c3f0d5 clearly shows the fix in includes/html/pages/addhost.inc.php
. The change involves adding htmlentities()
to $group['group_name']
before it's echoed within an HTML <option>
tag. This indicates that prior to the patch, the group_name
was output directly, leading to the XSS. The code responsible for this output is directly within the addhost.inc.php
script, not encapsulated in a specific user-defined function within that file that is visible from the patch. Therefore, the script file itself is considered the vulnerable component in terms of runtime execution leading to the vulnerability. The POC also confirms that the payload is executed when the victim navigates to http://localhost/addhost
which is handled by addhost.inc.php