# CVE-2026-77806: SPIP before 4.4.21 allows unauthenticated remote attackers to execute arbitrary code, as exploited in the wild in Augus…

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

## At a glance

CVE-2026-77806 is rated Critical 9.8 (CVSS 3.1, CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H). It affects SPIP and was published on 21 Aug 2026. It is not in CISA's Known Exploited Vulnerabilities catalog. Its EPSS score is 4.5%: the estimated chance it is exploited in the next 30 days, as of 24 Nov 2026. The upatch `cve-2026-77806-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-77806, published on 21 August 2026, is an unauthenticated remote code execution vulnerability in SPIP before 4.4.21 that was exploited in the wild in August 2026. In SPIP's template rendering engine, `analyse_resultat_skel()` parses rendered skeleton output for `<?php header("X-Spip-Filtre: ..."); ?>` patterns and invokes the listed functions as filters on the page body. By injecting a newline and a `header("X-Spip-Filtre: ...")` call into a parameter that reaches the compiled skeleton, or through a forum preview field, an unauthenticated attacker can supply a filter chain such as `intval|_request|system` and execute arbitrary shell commands via a request parameter. SPIP's security screen (`ecran_securite.php`) does not stop this vector.

### Official description

SPIP before 4.4.21 allows unauthenticated remote attackers to execute arbitrary code, as exploited in the wild in August 2026. This is related to code injection via an X-Spip-Filtre HTTP request header that is mishandled by analyse_resultat_skel.

## What the upatch does

The program attaches to `lsm/bprm_check_security` and returns `-EPERM` when the calling task's command name or executable name starts with `php` (matching `php`, `php-fpm*`, `php-cgi*`, and versioned binaries such as `php8.3` or `php8.4`). When SPIP processes an injected `X-Spip-Filtre` filter chain that invokes a command-execution function (`system`, `exec`, `passthru`, `shell_exec`, `popen`, `proc_open`), PHP spawns a child process and calls `execve()`, which reaches `bprm_check_security` while the current task is still the PHP process. A refusal from an earlier BPF LSM program on the same hook is passed on unchanged.

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

## Side effects

- PHP processes (`php`, `php-fpm`, `php-cgi`) cannot execute external binaries via `execve()`.
- Any SPIP plugin or feature that relies on external command-line tools (such as external image conversion binaries rather than PHP's GD or Imagick extensions) fails while the upatch is loaded.
- Normal SPIP page rendering, template compilation, SQLite/MySQL database queries, and HTTP responses work without change.
- In-process PHP functions that do not call `execve()` are not intercepted by `bprm_check_security`.
- Not covered: SPIP running inside `mod_php` under an `apache2` or `httpd` worker whose task command name and executable are not `php*`.

## Preemption model and cost

The program keeps no maps and no shared or per-CPU state, so it is safe under every preemption model, including preemptible RCU (`PREEMPT_LAZY`, `PREEMPT_DYNAMIC`) and `PREEMPT_RT`. It runs only on `execve()` calls (`bprm_check_security`), checks the current task's command name and executable dentry name, and returns `0` immediately for non-PHP processes.

## Affected versions

Every kernel supported by shirudo with BPF LSM enabled. The vulnerable software is SPIP before 4.4.21 (including 4.4.19 and 4.4.20), fixed in SPIP 4.4.21.

## How it was tested

On SPIP 4.4.20 running under PHP's built-in server on loopback, the loaded upatch refused subprocess execution triggered through the X-Spip-Filtre filter chain in analyse_resultat_skel(), while in-process SPIP requests continued to work.

- **Tested:** 25 Nov 2026
- **Target:** SPIP 4.4.20 on PHP built-in server with SQLite 3, loopback only
- **Kernel:** 7.4-shirudo-ci-20261123
- **Architecture:** x86_64
- **Distribution:** Ubuntu 26.04

### Results

| State           | X-Spip-Filtre subprocess exec (intval\|\_request\|system) | In-process SPIP request (intval\|phpinfo) |
| --------------- | --------------------------------------------------------- | ----------------------------------------- |
| Before loading  | reached (HTTP 200)                                        | yes                                       |
| Upatch loaded   | blocked (EPERM)                                           | yes                                       |
| After unloading | reached (HTTP 200)                                        | yes                                       |

## 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-77806
```

Publish and roll out:

```sh
shirudo bpm push build/packages/cve-2026-77806-1.0.0.bee oci://<registry>/<namespace>/cve-2026-77806 --keys-dir <keys-dir>
shirudo bpm tree append build/packages/cve-2026-77806-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-77806 record (CVE API)](https://cveawg.mitre.org/api/cve/CVE-2026-77806)
- [SPIP 4.4.21 security advisory](https://blog.spip.net/Mise-a-jour-critique-de-securite-sortie-de-SPIP-4-4-21.html)
- [Metasploit module PR #21790](https://github.com/rapid7/metasploit-framework/pull/21790) and [commit b16eca819abb](https://github.com/rapid7/metasploit-framework/pull/21790/commits/b16eca819abb8f1401f21d115e71e3dfc67b847c)
- [SPIP release archives](https://files.spip.net/spip/archives/)

### Links

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

### More references from NVD (4)

- [blog.spip.net](https://blog.spip.net/Mise-a-jour-critique-de-securite-sortie-de-SPIP-4-4-21.html)
- [github.com](https://github.com/rapid7/metasploit-framework/pull/21790)
- [github.com](https://github.com/rapid7/metasploit-framework/pull/21790#issuecomment-5368038123)
- [github.com](https://github.com/rapid7/metasploit-framework/pull/21790/commits/b16eca819abb8f1401f21d115e71e3dfc67b847c)
