# CVE-2026-77009: WatchMan-Site7 3.1.1 - 4.2.0 - Subscriber+ RCE via Debug Console

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

## At a glance

CVE-2026-77009 is rated Critical 9.9 (CVSS 3.1, CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H). It affects WatchMan-Site7 and was published on 2 Sept 2026. It is not in CISA's Known Exploited Vulnerabilities catalog. Its EPSS score is 0.5%: the estimated chance it is exploited in the next 30 days, as of 25 Nov 2026. The upatch `cve-2026-77009-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-77009, published on 2 September 2026, is an authenticated remote code execution vulnerability (CWE-94, CVSS 9.9) in the WatchMan-Site7 (`watchman-site7`) WordPress plugin in versions 3.1.1 through 4.2.0. In `watchman-site7.php`, the plugin unconditionally includes `includes/wms7-query.php` and registers `wms7_query()` on the `wp_ajax_query` WordPress AJAX hook (`add_action("wp_ajax_query", "wms7_query")`), along with `includes/wms7-common.php` (`wms7_parse_code()`). Because WordPress dispatches `wp_ajax_*` actions in `wp-admin/admin-ajax.php` for every logged-in user and `wms7_query()` performs no capability or nonce check, any authenticated user (including a low-privilege Subscriber) can send a `POST` request to `wp-admin/admin-ajax.php?action=query` with a `query` parameter. `wms7_parse_code()` tokenizes `$_POST['query']`, stores it in the `wms7_console` option under `code`, and `wms7_query()` passes `$wms7_console['code']` directly to `eval()`. No fixed version exists because the plugin was permanently closed on WordPress.org at the author's request.

### Official description

The WatchMan-Site7 WordPress plugin through 4.2.0 does not restrict access to its debugging console, which executes user-supplied PHP code, allowing any authenticated user, such as a subscriber, to run arbitrary code on the server.

## What the upatch does

One BPF LSM program on `lsm/bprm_check_security` returns `-EPERM` when:

1. The current task's executable name or task `comm` begins with `php` (matching `php`, `php8.3`, `php-fpm8.3`, `php-cgi`, and similar PHP runtimes).
2. The current task's working directory (`current->fs->pwd.dentry`), or one of its parent directories up to six levels deep, is named `watchman-site7`, `wp-content`, `wp-admin`, or `wp-includes`.

When PHP code evaluated by `wms7_query()` during an `admin-ajax.php` request invokes a command-execution function (`system`, `exec`, `passthru`, `shell_exec`, `popen`, or `proc_open`), the kernel refuses the `execve` system call with `-EPERM` before the child program or shell starts. Any non-zero refusal returned by an earlier BPF LSM program on the same hook is preserved, and the `refused` per-CPU array map counts refused executions at key 0.

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

## Side effects

- Any PHP process whose current working directory is inside `watchman-site7`, `wp-content`, `wp-admin`, or `wp-includes` cannot spawn external binaries via `execve`.
- Normal WatchMan-Site7 visitor tracking, country statistics, blacklists, and WordPress page rendering run inside PHP and talk to the database over sockets without spawning external programs.
- WordPress plugins or administrative actions running inside `wp-admin` or `wp-content` that invoke external CLI binaries (such as `sendmail` or `convert`) fail with `EPERM` while the upatch is loaded.
- Not covered: in-process PHP evaluation inside `wms7_query()` that does not call `execve` (such as reading or modifying WordPress options or database rows in PHP memory), or a PHP runtime whose executable and `comm` do not start with `php`.

## Preemption model and cost

The program keeps no shared mutable state beyond the per-CPU `refused` counter, updated with `__sync_fetch_and_add`, making it safe under every kernel preemption model including preemptible RCU (`PREEMPT_LAZY`, `PREEMPT_DYNAMIC`) and `PREEMPT_RT`. The hook runs only on `execve`, checks the current process executable and `comm` first, and returns immediately for every non-PHP process.

## Affected versions

The vulnerability is in the WatchMan-Site7 (`watchman-site7`) WordPress plugin, not the Linux kernel:

| Software                          | Affected       | Fixed in              |
| --------------------------------- | -------------- | --------------------- |
| WatchMan-Site7 (`watchman-site7`) | 3.1.1 to 4.2.0 | never (plugin closed) |

The BPF program uses `lsm/bprm_check_security` with CO-RE reads of `task_struct`, `mm_struct`, `fs_struct`, and `dentry`, which are present on all Linux kernels supported by shirudo.

## How it was tested

On WatchMan-Site7 4.2.0 served by PHP on loopback, the loaded upatch refused subprocess execution triggered via wms7_query() on wp_ajax_query while normal WordPress AJAX requests continued to work.

- **Tested:** 25 Nov 2026
- **Target:** WatchMan-Site7 4.2.0 on PHP CLI built-in web server, loopback only
- **Kernel:** 7.4-shirudo-ci-20261123
- **Architecture:** x86_64
- **Machine:** shirudo test VM
- **Distribution:** Ubuntu 26.04

### Results

| State           | wp_ajax_query (wms7_query) spawns /bin/echo | Normal WordPress AJAX request |
| --------------- | ------------------------------------------- | ----------------------------- |
| Before loading  | yes                                         | 200                           |
| Upatch loaded   | no (EPERM)                                  | 200                           |
| After unloading | yes                                         | 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-77009
```

Publish and roll out:

```sh
shirudo bpm push build/packages/cve-2026-77009-1.0.0.bee oci://<registry>/<namespace>/cve-2026-77009 --keys-dir <keys-dir>
shirudo bpm tree append build/packages/cve-2026-77009-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-77009 record (CVE API)](https://cveawg.mitre.org/api/cve/CVE-2026-77009)
- [WPScan vulnerability 2881cd28-6c30-4942-9443-317dd19f1e4a](https://wpscan.com/vulnerability/2881cd28-6c30-4942-9443-317dd19f1e4a/)
- WatchMan-Site7 4.2.0 in WordPress Plugin SVN: [watchman-site7.php](https://plugins.svn.wordpress.org/watchman-site7/tags/4.2.0/watchman-site7.php), [includes/wms7-query.php](https://plugins.svn.wordpress.org/watchman-site7/tags/4.2.0/includes/wms7-query.php), and [includes/wms7-common.php](https://plugins.svn.wordpress.org/watchman-site7/tags/4.2.0/includes/wms7-common.php)
- [WordPress.org checksum manifest for WatchMan-Site7 4.2.0](https://downloads.wordpress.org/plugin-checksums/watchman-site7/4.2.0.json)

### Links

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

### More references from NVD (1)

- [wpscan.com](https://wpscan.com/vulnerability/2881cd28-6c30-4942-9443-317dd19f1e4a/)
