Skip to main content

CVE-2025-65093 — Vulnerability in librenms/librenms — CVE Details

MEDIUM

LibreNMS is vulnerable to SQL Injection (Boolean-Based Blind) in hostname parameter in ajax_output.php endpoint

Published November 18, 2025Updated December 5, 2025Source: OSV

What Should I Do?

Address in Next Maintenance Window

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

Does your project use an affected librenms/librenms version?

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

A Boolean-Based Blind SQL Injection vulnerability was identified in the LibreNMS application at the /ajax_output.php endpoint. The hostname parameter is interpolated directly into an SQL query without proper sanitization or parameter binding, allowing an attacker to manipulate the query logic and infer data from the database through conditional responses.


Details

  • Vulnerable Endpoint: `GET /ajax_output.php

  • Parameter: hostname

  • Authentication Required: Admin privileges required to access /ajax_output.php discovery endpoint

  • Vulnerability type: Boolean-Based Blind SQL Injection — input is concatenated into a SQL statement without proper escaping


Description

The LibreNMS application uses the hostname parameter during device discovery operations to query the database for matching devices.
However, user-supplied data is concatenated directly into the SQL query within /opt/librenms/includes/html/output/capture.inc.php without adequate sanitization..

This allows attackers to modify the query logic using Boolean expressions.
When crafted conditions evaluate to true, the application behaves normally and returns the expected device data.
When conditions evaluate to false, the response is altered (e.g., the queried host is not found).

This difference in behavior confirms that the parameter’s value is being interpreted as SQL logic, demonstrating a Boolean-Based Blind SQL Injection.

Note: This vulnerability requires an authenticated user with administrator privileges to access the affected discovery functionality. While this limits exploitation to internal or compromised admin sessions, the vulnerability still represents a critical security risk due to the ability to manipulate backend SQL logic in privileged contexts.


Proof of Concept (PoC)

1 - Authenticate with an administrator account.
The discovery endpoint /ajax_output.php is accessible only to users with admin-level privileges.

2 - Access the following URL with the payload that evaluates to TRUE:

GET /ajax_output.php?id=capture&format=text&type=discovery&hostname=10.0.5.4'+AND+1=1+AND+'1'='1 HTTP/1.1
Host: 10.0.5.5:8000
Accept: */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
Referer: http://10.0.5.5:8000/device/3/capture
Cookie: laravel_session=[ADMIN_SESSION_COOKIE]
Priority: u=0

3 - Observe that the system returns the expected data and triggers the discovery process.

4 - Now repeat the request with a FALSE condition:

GET /ajax_output.php?id=capture&format=text&type=discovery&hostname=10.0.5.4'+AND+1=2+AND+'1'='1 HTTP/1.1
Host: 10.0.5.5:8000
Accept: */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
Referer: http://10.0.5.5:8000/device/3/capture
Cookie: laravel_session=[SESSION COOKIE]
Priority: u=0

5 - Observe that the response is altered: no device is found, and no discovery is triggered.

Query behavior observed in logs

SQL[SELECT * FROM `devices` WHERE disabled = 0 AND `hostname` LIKE '10.0.5.4' AND 1=1 AND '1'='1' ORDER BY device_id DESC [] 0.5ms]

The difference in output confirms that the injected Boolean logic is being executed by the database.


Impact

Boolean-based SQL Injection can have severe consequences depending on the deployment context:

  • Data extraction: Attackers can infer database data (schema, users, configuration) through Boolean inference techniques.

  • System compromise: Database or application state could be manipulated if the injection is further exploited.

  • Information disclosure: Reveals internal SQL structure and logic of the LibreNMS backend.


References

  • CWE-89 — Improper Neutralization of Special Elements used in an SQL Command (‘SQL Injection’)

  • OWASP SQL Injection Prevention Cheat Sheet

Advisory Timeline

  • First published November 18, 2025 (373 days ago).
  • Last revised December 5, 2025 — 17 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

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

Vulnerability Classification

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

CVSS Score Breakdown

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

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

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

Frequently Asked Questions

What is CVE-2025-65093?
LibreNMS is vulnerable to SQL Injection (Boolean-Based Blind) in hostname parameter in ajax_output.php endpoint. This vulnerability has been assigned a severity rating of MEDIUM (CVSS score: 5.5/10).
How do I check if my project is affected by CVE-2025-65093?
CVE-2025-65093 affects librenms/librenms. It has a 0.5% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2025-65093 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
5.5

Exploitation requires specific conditions, or the impact is limited.

EPSS Score (30-day exploit probability)
0.51%
EPSS percentile: 36.5

This is a below-median EPSS score — only 36.5% 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-6pmj-xjxp-p8g9

Related CVEs

  • CVE-2024-51092
    CRITICAL

    LibreNMS has an Authenticated OS Command Injection

  • CVE-2026-84189
    HIGH

    LibreNMS: SSRF-driven stored XSS via Oxidized API response fields in device showconfig page

  • CVE-2026-84192
    HIGH

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

  • CVE-2024-50351
    HIGH

    LibreNMS has a Reflected XSS ('Cross-site Scripting') in librenms/includes/functions.php

  • CVE-2026-84188
    MEDIUM

    LibreNMS: Stored XSS via graph_descr admin config settings echoed without escaping to all authenticated users

  • CVE-2024-47523
    MEDIUM

    LibreNMS has Stored Cross-site Scripting vulnerability in "Alert Transports" feature

  • CVE-2024-47527
    MEDIUM

    LibreNMS has Stored Cross-site Scripting vulnerability in "Device Dependencies" feature

  • CVE-2025-55296
    MEDIUM

    LibreNMS allows stored XSS in Alert Template name field

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my composer.lock