upatch.dev

CVE-2026-8450

HTTP::Daemon versions before 6.17 for Perl allow OS command injection via send_file()

Refuses execve by HTTP::Daemon Perl server processes to mitigate CVE-2026-8450.

Critical 9.1Vetted

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

At a glance

CVE-2026-8450 is a critical (CVSS 9.1) vulnerability in HTTP::Daemon, published 27 May 2026. A vetted upatch, cve-2026-8450-exec-block, blocks it on running Linux machines with shirudo until HTTP::Daemon is upgraded.

Severity
Critical 9.1 CVSS 3.1
Chance of exploitation
1.4% in the next 30 days (EPSS, 24 Nov 2026)
Known exploited
No, not on CISA’s KEV list
Weakness
CWE-73, CWE-78
Affected software
HTTP::Daemon (OALDERS)
Upatch status
Vetted, merged into the registry
How to apply
Build, sign and roll out with shirudo

Overview

CVE-2026-8450 affects Perl's HTTP::Daemon distribution in versions before 6.17 (6.16 and earlier). HTTP::Daemon::ClientConn::send_file() opened a string filename argument with Perl's 2-argument open(FILE, $file), which interprets shell-magic prefixes and suffixes such as | cmd (write pipe) and cmd | (read pipe, which also streams subprocess standard output into the HTTP response body), as well as > path and >> path write modes. Any HTTP::Daemon server that passes attacker-controlled input to send_file() allows operating system command execution at the daemon's UID. Version 6.17 fixes the bug in commit 945d35141d94490f749640bd4390acd6a2193995 by switching to 3-argument open(my $fh, '<', $file) so the argument is treated as a literal file path.

Official description

HTTP::Daemon versions before 6.17 for Perl allow OS command injection via send_file(). send_file() opens its string argument with Perl's 2-arg open(). The 2-arg form interprets magic prefixes: '| cmd' and 'cmd |' open a pipe to a subprocess, '> path' and '>> path' open the path for write or append. Untrusted input passed to send_file() can run OS commands at the daemon process UID. The read-pipe form ('cmd |') also leaks subprocess stdout into the HTTP response body. The write-mode forms can create or truncate files at attacker chosen paths.

Affected versions

The vulnerability is in the userspace Perl HTTP::Daemon module before version 6.17, independent of the kernel version. The upatch uses the standard lsm/bprm_check_security hook and CO-RE reads of task_struct->comm and task_struct->real_parent, which are present on all shirudo-supported Linux kernels with BPF LSM enabled.

Sources

More references from NVD (11)

Mitigation

A BPF LSM program attached to lsm/bprm_check_security inspects the current task and its real_parent. When either task has the command name http-daemon (accounting for the child process that Perl forks before invoking execve for a piped open()), the program increments entry 0 of the refused per-CPU array map and returns -EPERM. Any non-zero verdict from an earlier BPF LSM program on the same hook is preserved.

Side effects

  • Processes named http-daemon and their direct child processes cannot execute external binaries via execve. Normal static file serving in HTTP::Daemon uses open(), sysread() and socket writes in-process and does not execute subprocesses.
  • The write-mode forms of 2-argument open() (> path, >> path) open files directly without execve and are not covered by this hook.
  • Perl HTTP::Daemon servers running under a process name other than http-daemon are not matched unless their command name is set to http-daemon.

Preemption model and cost

The program holds no locks and updates its single per-CPU counter with __sync_fetch_and_add, making it safe under all preemption models including PREEMPT_LAZY, PREEMPT_DYNAMIC and PREEMPT_RT. Each execve on the machine performs at most two 16-byte kernel string reads of task_struct->comm before returning 0 for unrelated processes.

The policy

56 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 bool is_http_daemon(const struct task_struct *task)
{
	char comm[16] = {};

	if (!task)
		return false;
	if (bpf_probe_read_kernel_str(comm, sizeof(comm), &task->comm) < 0)
		return false;
	return comm[0] == 'h' && comm[1] == 't' && comm[2] == 't' &&
	       comm[3] == 'p' && comm[4] == '-' && comm[5] == 'd' &&
	       comm[6] == 'a' && comm[7] == 'e' && comm[8] == 'm' &&
	       comm[9] == 'o' && comm[10] == 'n' && comm[11] == '\0';
}

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

SEC("lsm/bprm_check_security")
int BPF_PROG(cve_2026_8450_exec, struct linux_binprm *bprm, int ret)
{
	struct task_struct *task;
	__u32 key = 0;
	__u64 *value;

	if (ret)
		return earlier_verdict(ret);
	task = bpf_get_current_task_btf();
	if (!is_http_daemon(task) &&
	    !is_http_daemon(BPF_CORE_READ(task, real_parent)))
		return 0;
	value = bpf_map_lookup_elem(&refused, &key);
	if (value)
		__sync_fetch_and_add(value, 1);
	return -EPERM;
}

Process

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

  1. 27 May 2026CVECVE published
  2. 25 Nov 2026Pull requestPull request #21 openedAdd CVE-2026-8450: Refuses execve by HTTP::Daemon Perl server processesromanlab
  3. 25 Nov 2026MergeMerged #21romanlab
  4. 25 Nov 2026ReviewReviewedqodo-code-review[bot] (automated)

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

Evidence

On a vulnerable HTTP::Daemon 6.16 server, the loaded upatch refused subprocess execution via send_file() read-pipe magic with EPERM while normal file serving continued to work.

Tested
25 Nov 2026
Target
Perl HTTP::Daemon 6.16 running as http-daemon on 127.0.0.1:18450
Kernel
7.4-shirudo-ci-20261123
Architecture
x86_64
Distribution
Ubuntu 26.04
Results
StateRead-pipe subprocess via send_file()Normal file serving (hello.txt)
Before loadingreachedHTTP 200
Upatch loadedblocked (EPERM)HTTP 200
After unloadingreachedHTTP 200
tools-test.log Output of tools/test --setup before, while and after the upatch was loaded.
tools/test --setup, 2026-11-25T10:58:57Z
Target: shirudo test VM, Linux 7.4-shirudo-ci-20261123, x86_64, swtpm
cve-2026-8450
  setup   done         HTTP_DAEMON_URL=http://127.0.0.1:18450
  before  reached      send_file() executed the read-pipe command and returned its output
  loaded  blocked      the read-pipe subprocess execution in send_file() was refused with EPERM
  after   reached      send_file() executed the read-pipe command and returned its output
  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-8450
Publish and roll out
shirudo bpm push build/packages/cve-2026-8450-1.0.0.bee oci://<registry>/<namespace>/cve-2026-8450 --keys-dir <keys-dir>
shirudo bpm tree append build/packages/cve-2026-8450-1.0.0.bee oci://<registry>/<namespace>/<tree> --tree-id <tree-id> --keys-dir <keys-dir>