upatch.dev

CVE-2026-84190

LibreNMS before 26.5.0 Remote Code Execution via AboutController

Refuses executing temporary files from PHP shell processes to mitigate CVE-2026-84190 in LibreNMS.

High 8.7Vetted

EPSS 0.9%: the estimated chance this CVE is exploited in the next 30 days, as of 24 Nov 2026.

At a glance

CVE-2026-84190 is a high (CVSS 8.7) vulnerability in LibreNMS, published 1 September 2026. A vetted upatch, cve-2026-84190-exec-block, blocks it on running Linux machines with shirudo until LibreNMS is upgraded.

Severity
High 8.7 CVSS 4.0
Chance of exploitation
0.9% in the next 30 days (EPSS, 24 Nov 2026)
Known exploited
No, not on CISA’s KEV list
Weakness
CWE-77
Affected software
LibreNMS
Upatch status
Vetted, merged into the registry
How to apply
Build, sign and roll out with shirudo

Overview

CVE-2026-84190 (GHSA-jf24-8g2h-2wg7) is a remote code execution vulnerability in LibreNMS versions before 26.5.0. In app/Http/Controllers/AboutController.php, AboutController::index() reads the snmpget configuration value (LibrenmsConfig::get('snmpget', 'snmpget')) and concatenates it into shell_exec(LibrenmsConfig::get('snmpget', 'snmpget') . ' -V 2>&1'). In LibreNMS/Util/DynamicConfigItem.php, checkValue() for the executable setting type writes $value == $this->sanitizePath($value) with == instead of =, discarding the return value of sanitizePath() and only checking is_file($value) && is_executable($value). An authenticated administrator can point snmpget (via PUT /settings/snmpget) to an executable file placed in a writable directory such as /tmp and trigger execution by requesting /about.

Official description

LibreNMS versions before 26.5.0 contain a remote code execution vulnerability in the AboutController where the snmpget configuration parameter is passed to shell_exec() without proper validation. An authenticated administrator can modify the snmpget configuration to point to a malicious executable file and trigger code execution by accessing the /about endpoint.

Affected versions

LibreNMS:

Affected Fixed in
Before 26.5.0 (including 26.3.1) 26.5.0

In 26.5.0 (commit f6a6e23390e39af7c0630da8ee0fc6feb20e8cd6, pull request #19612), AboutController::index() replaces the shell_exec() call with $version->netSnmp() in LibreNMS\Util\Version.

Sources

More references from NVD (2)

Mitigation

The BPF LSM program cve_2026_84190_exec attaches to lsm/bprm_check_security and returns -EPERM when both conditions hold:

Check Condition
Target path bprm->filename starts with /tmp/ or /var/tmp/, or bprm->file->f_path.dentry has an ancestor directory named tmp within 6 levels
Process tree The current task or one of its ancestors (up to 6 levels via real_parent) has a comm or exe_file name starting with php (php, php-fpm*, php8*)

Normal system binaries used by LibreNMS (/usr/bin/snmpget, /usr/bin/rrdtool, /usr/bin/python3, /usr/bin/git, /bin/sh) reside under /usr and /bin, so they pass the path check immediately without walking the task hierarchy.

The refused per-CPU array map counts refused executions at key 0.

Side effects

  • PHP processes and shells they spawn cannot execute binaries or scripts located inside /tmp or /var/tmp.
  • Legitimate LibreNMS tools installed in standard system paths (/usr/bin, /bin, /usr/local/bin) continue to work normally.
  • Non-PHP processes on the machine can still execute files in /tmp and /var/tmp.

Preemption model and cost

The program holds no state other than the refused per-CPU counter updated with __sync_fetch_and_add, making it safe under all kernel preemption models including PREEMPT_LAZY, PREEMPT_DYNAMIC, and PREEMPT_RT. On every execve, the program checks the first bytes of bprm->filename and walks at most 6 parent dentries looking for a 3-byte parent directory named tmp; executions of binaries under /usr or /bin return 0 without inspecting the task hierarchy.

The policy

132 lines of BPF C, attached at lsm/bprm_check_security.

// SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause

#include "vmlinux.h"
#include <bpf/bpf_helpers.h>
#include <bpf/bpf_tracing.h>
#include <bpf/bpf_core_read.h>

#define EPERM 1

char _license[] SEC("license") = "Dual BSD/GPL";

struct {
	__uint(type, BPF_MAP_TYPE_PERCPU_ARRAY);
	__uint(max_entries, 1);
	__type(key, __u32);
	__type(value, __u64);
} refused SEC(".maps");

static __always_inline void count_refused(void)
{
	__u32 key = 0;
	__u64 *value = bpf_map_lookup_elem(&refused, &key);

	if (value)
		__sync_fetch_and_add(value, 1);
}

static __always_inline int earlier_verdict(int ret)
{
	return ret >= -4095 && ret < 0 ? ret : -EPERM;
}

static __always_inline bool is_php_name(const char *s)
{
	return s[0] == 'p' && s[1] == 'h' && s[2] == 'p' &&
	       (s[3] == 0 || s[3] == '-' ||
		(s[3] >= '0' && s[3] <= '9'));
}

static __always_inline bool task_is_php(const struct task_struct *task)
{
	char buf[16] = {};
	const struct dentry *exe;
	const unsigned char *ename;

	if (!task)
		return false;
	if (bpf_probe_read_kernel(buf, sizeof(buf), &task->comm) == 0 &&
	    is_php_name(buf))
		return true;
	exe = BPF_CORE_READ(task, mm, exe_file, f_path.dentry);
	ename = BPF_CORE_READ(exe, d_name.name);
	if (ename && bpf_probe_read_kernel_str(buf, sizeof(buf), ename) > 0 &&
	    is_php_name(buf))
		return true;
	return false;
}

static __always_inline bool from_php_tree(void)
{
	const struct task_struct *task = bpf_get_current_task_btf();

	for (int i = 0; i < 6; i++) {
		if (!task)
			return false;
		if (task_is_php(task))
			return true;
		task = BPF_CORE_READ(task, real_parent);
	}
	return false;
}

static __always_inline bool path_starts_with_tmp(const char *p)
{
	if (p[0] == '/' && p[1] == 't' && p[2] == 'm' && p[3] == 'p' &&
	    p[4] == '/')
		return true;
	if (p[0] == '/' && p[1] == 'v' && p[2] == 'a' && p[3] == 'r' &&
	    p[4] == '/' && p[5] == 't' && p[6] == 'm' && p[7] == 'p' &&
	    p[8] == '/')
		return true;
	return false;
}

static __always_inline bool dentry_in_tmp(const struct dentry *dentry)
{
	char name[8] = {};

	for (int i = 0; i < 6; i++) {
		const struct dentry *parent;
		const unsigned char *pname;

		if (!dentry)
			return false;
		parent = BPF_CORE_READ(dentry, d_parent);
		if (!parent || parent == dentry)
			return false;
		if (BPF_CORE_READ(parent, d_name.len) == 3) {
			pname = BPF_CORE_READ(parent, d_name.name);
			if (pname &&
			    bpf_probe_read_kernel_str(name, sizeof(name), pname) > 0 &&
			    name[0] == 't' && name[1] == 'm' && name[2] == 'p' &&
			    name[3] == 0)
				return true;
		}
		dentry = parent;
	}
	return false;
}

SEC("lsm/bprm_check_security")
int BPF_PROG(cve_2026_84190_exec, struct linux_binprm *bprm, int ret)
{
	const char *filename;
	char pbuf[16] = {};
	bool in_tmp = false;

	if (ret)
		return earlier_verdict(ret);
	filename = BPF_CORE_READ(bprm, filename);
	if (filename &&
	    bpf_probe_read_kernel_str(pbuf, sizeof(pbuf), filename) > 0 &&
	    path_starts_with_tmp(pbuf))
		in_tmp = true;
	if (!in_tmp && !dentry_in_tmp(BPF_CORE_READ(bprm, file, f_path.dentry)))
		return 0;
	if (!from_php_tree())
		return 0;
	count_refused();
	return -EPERM;
}

Process

How this upatch was written, checked and reviewed, from the registry’s history.

  1. 1 Sept 2026CVECVE published
  2. 25 Nov 2026Pull requestPull request #42 openedAdd CVE-2026-84190: Refuses executing temporary files from PHP shell processes to mitigateromanlab
  3. 25 Nov 2026MergeMerged #42romanlab
  4. 25 Nov 2026ReviewReviewedqodo-code-review[bot] (automated)

No human review is recorded on GitHub for this upatch yet.

Evidence

On LibreNMS 26.3.1, the loaded upatch refused execution of a probe script in /tmp configured as the snmpget binary when requesting /about (returning EPERM), while execution succeeded before loading and after unloading.

Tested
25 Nov 2026
Target
LibreNMS 26.3.1 AboutController on PHP, snmpget set to a probe script in /tmp, loopback only
Kernel
7.4-shirudo-ci-20261123
Architecture
x86_64
Distribution
Ubuntu 26.04
Results
StateProbe script in /tmp executed via /about
Before loadingyes (reached)
Upatch loadedno (Operation not permitted)
After unloadingyes (reached)
tools-test.log Output of tools/test --setup on the shirudo test VM showing before, loaded and after runs.
tools/test --setup, 2026-11-25T12:06:43Z
Target: shirudo test VM, Linux 7.4-shirudo-ci-20261123, x86_64, swtpm
cve-2026-84190
  setup   done         LIBRENMS_URL=http://127.0.0.1:18080
  before  reached      AboutController executed /tmp/upatch-probe-a6520f43731b.sh via shell_exec
  loaded  blocked      execution of /tmp/upatch-probe-f145e2565ce7.sh from /about was refused (sh: 1: /tmp/upatch-probe-f145e2565ce7.sh: Operation not permitted)
  after   reached      AboutController executed /tmp/upatch-probe-ea4809d2e44f.sh via shell_exec
  PASS: reached before, blocked while loaded, reached again after

Use it

Build the upatch from source, sign it with your own shirudo key, and publish it to your own OCI registry. Machines that follow your upatch tree load it within about a minute.

Build and sign
git clone https://github.com/copper-helm/upatch-registry
cd upatch-registry
tools/build <shirudo-checkout> <keys-dir> 1.0.0 upatches/cve-2026-84190
Publish and roll out
shirudo bpm push build/packages/cve-2026-84190-1.0.0.bee oci://<registry>/<namespace>/cve-2026-84190 --keys-dir <keys-dir>
shirudo bpm tree append build/packages/cve-2026-84190-1.0.0.bee oci://<registry>/<namespace>/<tree> --tree-id <tree-id> --keys-dir <keys-dir>