Skip to main content

CVE-2026-26988 — LibreNMS: SQL Injection in librenms/librenms

HIGH

LibreNMS: SQL Injection in ajax_table.php spreads through a covert data stream.

Published February 18, 2026Updated February 22, 2026Source: OSV

What Should I Do?

Address in Next Maintenance Window

Low exploitation probability (0.57%). Schedule for your next planned update.

Does your project use an affected librenms/librenms version?

Paste your composer.lock to check it for CVE-2026-26988 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

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:

  1. Access the application instance.

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

Advisory Timeline

  • First published February 18, 2026 (281 days ago).
  • Last revised February 22, 2026 — 4 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Composer
Update librenms/librenms to 26.2.0 or later
composer require "librenms/librenms:^26.2.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 (+145 more)26.2.0

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

Frequently Asked Questions

What is CVE-2026-26988?
LibreNMS: SQL Injection in ajax_table.php spreads through a covert data stream. This vulnerability has been assigned a severity rating of HIGH.
How do I check if my project is affected by CVE-2026-26988?
CVE-2026-26988 affects librenms/librenms. It has a 0.6% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-26988 and 200,000+ other known vulnerabilities.

Severity & Exploitability

EPSS Score (30-day exploit probability)
0.57%
EPSS percentile: 41

This is a below-median EPSS score — only 41% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.

Also Known As

GHSA-h3rv-q4rq-pqcv

Related CVEs

  • CVE-2022-4070
    CRITICAL

    Insufficient Session Expiration in librenms/librenms

  • CVE-2026-84192
    HIGH

    LibreNMS — Stored XSS via SNMP/Syslog Data in Legacy Templates

  • CVE-2024-49759
    HIGH

    Stored XSS ('Cross-site Scripting') in librenms/includes/html/pages/edituser.inc.php

  • CVE-2024-52526
    HIGH

    LibreNMS has a Stored XSS ('Cross-site Scripting') in librenms/includes/html/pages/device/services.inc.php

  • CVE-2024-50350
    HIGH

    LibreNMS has a Stored XSS ('Cross-site Scripting') in librenms/app/Http/Controllers/Table/EditPortsController.php

  • CVE-2025-62365
    MEDIUM

    LibreNMS is vulnerable to Reflected-XSS in `report_this` function

  • CVE-2026-26992
    MEDIUM

    LibreNMS /port-groups name Stored Cross-Site Scripting

  • CVE-2024-47528
    LOW

    LibreNMS vulnerable to Stored Cross-site Scripting via File Upload

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my composer.lock