A second-order SQL injection issue in Widgets/TopDevicesController.php (aka the Top Devices dashboard widget) of LibreNMS before 21.1.0 allows remote authenticated attackers to execute arbitrary SQL commands via the sort_order parameter against the /ajax/form/widget-settings endpoint.
The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. Without sufficient removal or quoting of SQL syntax in user-controllable inputs, the generated SQL query can cause those inputs to be interpreted as SQL instead of ordinary user data.
Link | Tags |
---|---|
https://github.com/librenms/librenms/blob/master/app/Http/Controllers/Widgets/TopDevicesController.php | third party advisory |
https://github.com/librenms/librenms/issues/12405 | third party advisory |
https://www.horizon3.ai/disclosures/librenms-second-order-sqli | third party advisory exploit |
https://github.com/librenms/librenms/pull/12422 | third party advisory patch |
https://github.com/librenms/librenms/releases/tag/21.1.0 | third party advisory release notes |