GHSA-6pmj-xjxp-p8g9 — librenms/librenms
MEDIUMGHSA-6pmj-xjxp-p8g9 is a medium-severity (CVSS 5.5) SQL Injection vulnerability in librenms/librenms. A fix is available for librenms/librenms — see the affected versions and patch details below.
LibreNMS is vulnerable to SQL Injection (Boolean-Based Blind) in hostname parameter in ajax_output.php endpoint
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
Exploitation and automatability from CISA’s SSVC triage for GHSA-6pmj-xjxp-p8g9.
EPSS Exploitation Probability
EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.
How urgent is this, really
GHSA-6pmj-xjxp-p8g9 plotted by exploitation likelihood (EPSS) against impact (CVSS). The shaded corner — EPSS 50%+ and CVSS 7.0+ — is where this CVE doesn't sit, though severity or exploitability alone can still warrant action.
Where this sits among everything scored
Of 377,166 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Real counts from FIRST.org, not a sample — log-scaled since the landscape is heavily right-skewed.
Real-World Exposure
librenms/librenmsReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Packagist packages — download data is not available via public APIs for these ecosystems.
Description
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.phpdiscovery 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.
<img width="1507" height="666" alt="image" src="https://github.com/user-attachments/assets/584e871a-a01a-4bad-8e09-c6dcb0e6cd1d" />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.
<img width="1496" height="662" alt="image" src="https://github.com/user-attachments/assets/b7d227bd-0a37-4589-81b6-26cca5135837" />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
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐘Packagist | librenms/librenms | all versions | 25.11.0composer require librenms/librenms:^25.11.0 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for librenms/librenms, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update librenms/librenms to 25.11.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-6pmj-xjxp-p8g9 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like GHSA-6pmj-xjxp-p8g9 can be triaged on real exposure rather than presence alone.
Tailored to GHSA-6pmj-xjxp-p8g9. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is GHSA-6pmj-xjxp-p8g9 in your dependencies?
O3 Security finds GHSA-6pmj-xjxp-p8g9 across Packagist dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.