Miggo Logo

CVE-2024-32480:
LibreNMS vulnerable to a Time-Based Blind SQL injection leads to database extraction

7.2

CVSS Score

Basic Information

EPSS Score
-
Published
4/22/2024
Updated
4/23/2024
KEV Status
No
Technology
TechnologyPHP

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
librenms/librenmscomposer< 24.4.024.4.0

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from the list_devices function's handling of the 'order' parameter. The pre-patch code: 1. Takes user input from $request->get('order') 2. Only checks for presence of 'asc'/'desc' keywords 3. Directly interpolates it into SQL query as 'd.$order ASC' without proper whitelisting. This allows attackers to inject SQL operators/statements through the order parameter. The patch confirms this by replacing the flawed validation with a regex pattern match that strictly validates column names and sort directions.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

### Summ*ry **t * v*li* *PI tok*n, m*k* sur* you **n ****ss *pi *un*tions, t**n r*pl*** strin* on my Po* *o**, T*st on o**i**l OV* im***, it's * ol* v*rsion **.*.*, *ut t*is vul*r**l* is *lso *xists on l*t*st v*rsion **.*.* ### **t*ils in *il* `*pi_

Reasoning

T** vuln*r**ility st*ms *rom t** list_**vi**s *un*tion's **n*lin* o* t** 'or**r' p*r*m*t*r. T** pr*-p*t** *o**: *. T*k*s us*r input *rom $r*qu*st->**t('or**r') *. Only ****ks *or pr*s*n** o* '*s*'/'**s*' k*ywor*s *. *ir**tly int*rpol*t*s it into SQL