# CVE-2026-8450: HTTP::Daemon versions before 6.17 for Perl allow OS command injection via send_file()

The Markdown version of <https://upatch.dev/cve/CVE-2026-8450>. Last updated 25 Nov 2026.

## At a glance

CVE-2026-8450 is rated Critical 9.1 (CVSS 3.1, CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N). It affects HTTP::Daemon (OALDERS) and was published on 27 May 2026. It is not in CISA's Known Exploited Vulnerabilities catalog. Its EPSS score is 1.4%: the estimated chance it is exploited in the next 30 days, as of 24 Nov 2026. The upatch `cve-2026-8450-exec-block` mitigates it, and is vetted (merged into the registry).

A upatch is a signed BPF program that shirudo loads into a running Linux kernel to block the code path this CVE's exploit takes. It holds the line until the fix ships; it does not replace patching.

## The vulnerability

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.

## What the upatch does

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.

The policy: [`cve-2026-8450-exec-block.bpf.c`](https://github.com/copper-helm/upatch-registry/tree/main/upatches/cve-2026-8450), 56 lines of BPF C attached at `lsm/bprm_check_security`, licensed GPL-2.0 OR BSD-2-Clause.

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

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

## How it was tested

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

| State           | Read-pipe subprocess via send_file() | Normal file serving (hello.txt) |
| --------------- | ------------------------------------ | ------------------------------- |
| Before loading  | reached                              | HTTP 200                        |
| Upatch loaded   | blocked (EPERM)                      | HTTP 200                        |
| After unloading | reached                              | HTTP 200                        |

## How to apply

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:

```sh
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:

```sh
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>
```

## Review

- Contributors: romanlab.
- Reviewers: none recorded yet.

## Sources and links

- [CVE-2026-8450 on oss-security](http://www.openwall.com/lists/oss-security/2026/05/27/5)
- [Fix commit 945d35141d94490f749640bd4390acd6a2193995](https://github.com/libwww-perl/HTTP-Daemon/commit/945d35141d94490f749640bd4390acd6a2193995.patch)
- [GitHub pull request #89](https://github.com/libwww-perl/HTTP-Daemon/pull/89)
- [HTTP-Daemon 6.17 Changes on MetaCPAN](https://metacpan.org/release/OALDERS/HTTP-Daemon-6.17/changes)
- [Debian LTS Announcement DLA-4639-1](https://lists.debian.org/debian-lts-announce/2026/06/msg00028.html)

### Links

- [CVE-2026-8450 on upatch.dev](https://upatch.dev/cve/CVE-2026-8450) (this page, as HTML)
- [NVD](https://nvd.nist.gov/vuln/detail/CVE-2026-8450)
- [CVE.org](https://www.cve.org/CVERecord?id=CVE-2026-8450)
- [CWE-73](https://cwe.mitre.org/data/definitions/73.html)
- [CWE-78](https://cwe.mitre.org/data/definitions/78.html)
- Upatch source: [upatches/cve-2026-8450](https://github.com/copper-helm/upatch-registry/tree/main/upatches/cve-2026-8450)

### More references from NVD (11)

- [github.com](https://github.com/libwww-perl/HTTP-Daemon/commit/945d35141d94490f749640bd4390acd6a2193995.patch)
- [github.com](https://github.com/libwww-perl/HTTP-Daemon/pull/89)
- [metacpan.org](https://metacpan.org/release/OALDERS/HTTP-Daemon-6.17/changes)
- [openwall.com](http://www.openwall.com/lists/oss-security/2026/05/27/5)
- [lists.debian.org](https://lists.debian.org/debian-lts-announce/2026/06/msg00028.html)
- [access.redhat.com](https://access.redhat.com/errata/RHSA-2026:36187)
- [access.redhat.com](https://access.redhat.com/errata/RHSA-2026:36188)
- [access.redhat.com](https://access.redhat.com/errata/RHSA-2026:36189)
- [access.redhat.com](https://access.redhat.com/security/cve/CVE-2026-8450)
- [bugzilla.redhat.com](https://bugzilla.redhat.com/show_bug.cgi?id=2481773)
- [security.access.redhat.com](https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-8450.json)
