Summary
SQL Injection in IPv6 Address Search functionality via address parameter*
A SQL injection vulnerability exists in the ajax_table.php endpoint. The application fails to properly sanitize or parameterize user input when processing IPv6 address searches. Specifically, the address parameter is split into an address and a prefix, and the prefix portion is directly concatenated into the SQL query string without validation. This allows an attacker to inject arbitrary SQL commands, potentially leading to unauthorized data access or database manipulation.
Details
The vulnerability is located in the logic that handles address searching when search_type is set to ipv6.
The application takes the user-supplied address parameter and splits it using the / delimiter:
[$address, $prefix] = explode('/', $vars['address']);
If the search_type is ipv6 and the $prefix variable is not empty, the code constructs the SQL query by directly concatenating the $prefix variable into the string:
} elseif ($vars['search_type'] == 'ipv6') {
// ... code omitted ...
if (! empty($prefix)) {
// VULNERABILITY: Direct concatenation of user input
$sql .= " AND ipv6_prefixlen = '$prefix'";
}
}
Unlike the ipv4 block, which attempts to use prepared statements (binding parameters via $param[]), the ipv6 block treats the prefix as a raw string. By supplying an input containing a /, an attacker can populate the $prefix variable. If this variable contains single quotes ('), it breaks out of the string literal in the SQL statement, enabling SQL injection.
Vulnerable Code Snippet:
if (! empty($prefix)) {
$sql .= " AND ipv6_prefixlen = '$prefix'";
}
PoC
To reproduce this vulnerability, an attacker can send a specially crafted HTTP POST request to the ajax_table.php endpoint.
Payload breakdown:
search_type=ipv6: Forces the execution flow into the vulnerable elseif block.
address=snow/1nd'":
The explode function splits this into $address = 'snow' and $prefix = "1nd'"".
The SQL query becomes: ... AND ipv6_prefixlen = '1nd'"'.
The single quote ' closes the string definition in the SQL query, and the subsequent characters allow for SQL syntax manipulation.
Reproduction Steps:
Access the application instance.
Send the following request (adjusting the host as necessary):
POST /ajax_table.php HTTP/1.1
Host: localhost
id=address-search&search_type=ipv6&address=snow/1nd'"
Impact
This vulnerability allows an attacker to execute arbitrary SQL queries against the database.
Untrusted input alters a database query, allowing the attacker to read or modify data the query was not intended to access. Typical impact: data disclosure or modification.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Remediation advice
Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.
Frequently Asked Questions
- What is CVE-2026-26988? CVE-2026-26988 is a high-severity SQL injection vulnerability in librenms/librenms (composer), affecting versions < 26.2.0. It is fixed in 26.2.0. Untrusted input alters a database query, allowing the attacker to read or modify data the query was not intended to access.
- Which versions of librenms/librenms are affected by CVE-2026-26988? librenms/librenms (composer) versions < 26.2.0 is affected.
- Is there a fix for CVE-2026-26988? Yes. CVE-2026-26988 is fixed in 26.2.0. Upgrade to this version or later.
- Is CVE-2026-26988 exploitable, and should I be worried? Whether CVE-2026-26988 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2026-26988 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2026-26988? Upgrade
librenms/librenmsto 26.2.0 or later.