CVE-2026-87791
Path traversal vulnerability in WordPress theme design-scuole-wordpress-theme
Refuses HTTP requests carrying the reservedfilecheck query action to mitigate CVE-2026-87791.
High 8.7Vetted
EPSS 0.5%: the estimated chance this CVE is exploited in the next 30 days, as of 25 Nov 2026.
NVDCVE.orgDesign Scuole WordPress theme, published 15 Sept 2026
At a glance
CVE-2026-87791 is a high (CVSS 8.7) vulnerability in Design Scuole WordPress theme, published 15 September 2026. A vetted upatch, cve-2026-87791-reserved-file-block, blocks it on running Linux machines with shirudo until Design Scuole WordPress theme is upgraded.
- Severity
- High 8.7 CVSS 4.0
- Chance of exploitation
- 0.5% in the next 30 days (EPSS, 25 Nov 2026)
- Known exploited
- No, not on CISA’s KEV list
- Weakness
- CWE-22
- Affected software
- Design Scuole WordPress theme (Developers Italia)
- Upatch status
- Vetted, merged into the registry
- How to apply
- Build, sign and roll out with shirudo
Overview
CVE-2026-87791, "Path traversal vulnerability in WordPress theme design-scuole-wordpress-theme", was published on 15 September 2026. In functions.php of the Developers Italia design-scuole-wordpress-theme WordPress theme from version 2.6.0 through 2.18.1, the init hook runs reserved_file_check(). When $_GET['action'] == "reservedfilecheck", reserved_file_check() concatenates wp_get_upload_dir()['basedir'] . '/' . $_GET['file'] into $filepath without resolving or validating the path against the upload directory. When attachment_url_to_postid() returns 0 (as it does for any path outside registered media attachments) and file_exists($filepath) is true, the function sends the file contents with readfile($filepath) and exits, allowing an unauthenticated remote client to download arbitrary files readable by the web server process, such as wp-config.php. Commit c34d83968f5f070ca7e7fc4664db603357d53899 (released in v2.18.2 on 30 May 2026, with further download handler updates in v2.18.3) fixes the flaw by resolving $basedir and $filepath with realpath() and verifying with strncmp() that $realpath starts with $realbasedir . DIRECTORY_SEPARATOR.
Official description
A path traversal vulnerability exists in the reserved_file_check function of the functions.php file in the WordPress Design Scuole Italia theme. The vulnerability allows an unauthenticated attacker to download arbitrary files accessible by the web server process.
Affected versions
Application versions: Developers Italia design-scuole-wordpress-theme from 2.6.0 through 2.18.1, fixed in 2.18.2 (commit c34d83968f5f070ca7e7fc4664db603357d53899) and 2.18.3.
Kernels: any Linux kernel supported by shirudo with CONFIG_CGROUP_BPF and cgroup v2 mounted at /sys/fs/cgroup.
Sources
More references from NVD (2)
Mitigation
It attaches to cgroup_skb/ingress at the root of the unified cgroup hierarchy and inspects incoming IPv4 and IPv6 TCP segments carrying an HTTP GET, POST, or HEAD request line. It loads up to the first 512 bytes of the TCP payload into a per-CPU scratch buffer and scans the HTTP request line (up to the first CR or LF byte, 0x0d or 0x0a) case-insensitively for the 17-byte token reservedfilecheck. When the request line contains reservedfilecheck, the program increments key 0 of the refused per-CPU counter map and returns 0 to drop the packet before the socket receives it. All other packets return 1.
Side effects
- Plain-text HTTP requests whose request line contains
reservedfilecheck(such asGET /?action=reservedfilecheck&file=...) are dropped atcgroup_skb/ingress, so the client connection times out without reachingreserved_file_check(). - Normal WordPress page views, REST API requests, media downloads, and administrative requests that do not carry
reservedfilecheckin the request line pass unchanged. - Not covered: TLS-terminated traffic that reaches the machine encrypted and is decrypted in userspace without forwarding over a local plain-text TCP socket, URL-encoded
actionparameter values (such as%72eservedfilecheck), or a request line split across multiple TCP segments or placingreservedfilecheckbeyond the first 512 bytes of the TCP payload.
Preemption model and cost
cgroup_skb/ingress runs in softirq context with BH disabled on the local CPU, so two runs of the program cannot interleave on the same CPU while accessing the scratch per-CPU buffer, and the refused per-CPU counter is updated with __sync_fetch_and_add. The program is safe under every kernel preemption model, including PREEMPT_LAZY, PREEMPT_DYNAMIC, and PREEMPT_RT. Non-TCP packets, TCP segments with fewer than 24 payload bytes, and TCP segments that do not start with GET , POST , or HEAD return after reading only the protocol headers and the first 8 payload bytes.
The policy
165 lines of BPF C, attached at cgroup_skb/ingress.
// SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
#include "vmlinux.h"
#include <bpf/bpf_helpers.h>
#include <bpf/bpf_endian.h>
#define ETH_P_IP 0x0800
#define ETH_P_IPV6 0x86dd
#define IPPROTO_TCP 6
#define SCAN_LEN 512
#define NEEDLE_LEN 17
#define MAX_OFF (SCAN_LEN - NEEDLE_LEN)
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");
struct {
__uint(type, BPF_MAP_TYPE_PERCPU_ARRAY);
__uint(max_entries, 1);
__type(key, __u32);
__type(value, char[SCAN_LEN]);
} scratch 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 char fold_lower(char c)
{
if (c >= 'A' && c <= 'Z')
return c + ('a' - 'A');
return c;
}
static __always_inline bool match_reservedfilecheck(const char *buf, __u32 off)
{
if (off > MAX_OFF)
return false;
return fold_lower(buf[off + 0]) == 'r' &&
fold_lower(buf[off + 1]) == 'e' &&
fold_lower(buf[off + 2]) == 's' &&
fold_lower(buf[off + 3]) == 'e' &&
fold_lower(buf[off + 4]) == 'r' &&
fold_lower(buf[off + 5]) == 'v' &&
fold_lower(buf[off + 6]) == 'e' &&
fold_lower(buf[off + 7]) == 'd' &&
fold_lower(buf[off + 8]) == 'f' &&
fold_lower(buf[off + 9]) == 'i' &&
fold_lower(buf[off + 10]) == 'l' &&
fold_lower(buf[off + 11]) == 'e' &&
fold_lower(buf[off + 12]) == 'c' &&
fold_lower(buf[off + 13]) == 'h' &&
fold_lower(buf[off + 14]) == 'e' &&
fold_lower(buf[off + 15]) == 'c' &&
fold_lower(buf[off + 16]) == 'k';
}
static __always_inline bool starts_with_http_method(const char *buf)
{
return (buf[0] == 'G' && buf[1] == 'E' && buf[2] == 'T' && buf[3] == ' ') ||
(buf[0] == 'P' && buf[1] == 'O' && buf[2] == 'S' && buf[3] == 'T' && buf[4] == ' ') ||
(buf[0] == 'H' && buf[1] == 'E' && buf[2] == 'A' && buf[3] == 'D' && buf[4] == ' ');
}
SEC("cgroup_skb/ingress")
int cve_2026_87791_reserved_file_block(struct __sk_buff *skb)
{
struct tcphdr tcp;
__u32 l4_off, doff, payload_off, payload_len, read_len, key = 0;
__u16 proto;
char *buf;
proto = bpf_ntohs((__u16)skb->protocol);
if (proto == ETH_P_IP) {
struct iphdr ip4;
if (bpf_skb_load_bytes(skb, 0, &ip4, sizeof(ip4)) < 0)
return 1;
if (ip4.protocol != IPPROTO_TCP)
return 1;
l4_off = (__u32)ip4.ihl * 4;
if (l4_off < sizeof(ip4))
return 1;
} else if (proto == ETH_P_IPV6) {
struct ipv6hdr ip6;
if (bpf_skb_load_bytes(skb, 0, &ip6, sizeof(ip6)) < 0)
return 1;
if (ip6.nexthdr != IPPROTO_TCP)
return 1;
l4_off = sizeof(ip6);
} else {
return 1;
}
if (bpf_skb_load_bytes(skb, l4_off, &tcp, sizeof(tcp)) < 0)
return 1;
doff = (__u32)tcp.doff * 4;
if (doff < sizeof(tcp))
return 1;
payload_off = l4_off + doff;
if (skb->len <= payload_off)
return 1;
payload_len = skb->len - payload_off;
if (payload_len < 24)
return 1;
buf = bpf_map_lookup_elem(&scratch, &key);
if (!buf)
return 1;
if (bpf_skb_load_bytes(skb, payload_off, buf, 8) < 0)
return 1;
if (!starts_with_http_method(buf))
return 1;
read_len = payload_len;
if (read_len > SCAN_LEN)
read_len = SCAN_LEN;
if (read_len >= 512) {
if (bpf_skb_load_bytes(skb, payload_off, buf, 512) < 0)
return 1;
} else if (read_len >= 256) {
if (bpf_skb_load_bytes(skb, payload_off, buf, 256) < 0)
return 1;
} else if (read_len >= 128) {
if (bpf_skb_load_bytes(skb, payload_off, buf, 128) < 0)
return 1;
} else if (read_len >= 64) {
if (bpf_skb_load_bytes(skb, payload_off, buf, 64) < 0)
return 1;
} else {
if (bpf_skb_load_bytes(skb, payload_off, buf, 24) < 0)
return 1;
read_len = 24;
}
for (__u32 i = 4; i <= MAX_OFF; i++) {
if (i + NEEDLE_LEN > read_len)
break;
if (buf[i] == 0x0d || buf[i] == 0x0a)
break;
if (match_reservedfilecheck(buf, i)) {
count_refused();
return 0;
}
}
return 1;
}
The package: name, license, the program and the CVE it fixes.
[package]
name = "cve-2026-87791"
description = "Refuses HTTP requests carrying the reservedfilecheck query action to mitigate CVE-2026-87791"
license = "GPL-2.0 OR BSD-2-Clause"
[[upatches]]
source = "cve-2026-87791-reserved-file-block.bpf.c"
[upatches.tree]
id = "cve-2026-87791-reserved-file-block"
fixes = ["CVE-2026-87791"]
Process
How this upatch was written, checked and reviewed, from the registry’s history.
- 15 Sept 2026CVECVE published
- 25 Nov 2026Pull requestPull request #84 openedAdd CVE-2026-87791: Refuses HTTP requests carrying the reservedfilecheck query actionromanlab
- 25 Nov 2026CIUpdate upatch.devpassed
- 25 Nov 2026CICIpassed
- 25 Nov 2026MergeMerged #84romanlab
No human review is recorded on GitHub for this upatch yet.
Evidence
On WordPress 6.7.2 running design-scuole-wordpress-theme v2.18.1, the loaded upatch dropped the reservedfilecheck traversal request while normal WordPress requests continued to succeed.
- Tested
- 25 Nov 2026
- Target
- WordPress 6.7.2 with design-scuole-wordpress-theme v2.18.1 on PHP built-in server, loopback only
- Kernel
- 7.4-shirudo-ci-20261123
- Architecture
- x86_64
- Distribution
- Ubuntu 26.04
| State | reservedfilecheck traversal reads probe file outside uploads | Normal WordPress request |
|---|---|---|
| Before loading | yes (HTTP 200) | 200 |
| Upatch loaded | no (blocked) | 200 |
| After unloading | yes (HTTP 200) | 200 |
tools-test.log Output of tools/test --setup showing the payload reached before, blocked while loaded, and reached after unloading.
tools/test --setup, 2026-11-25T14:45:29Z Target: shirudo test VM, Linux 7.4-shirudo-ci-20261123, x86_64, swtpm cve-2026-87791 setup done DSI_URL=http://127.0.0.1:18080 DSI_PROBE_REL=../../probe.txt before reached reserved_file_check returned ../../probe.txt outside uploads (HTTP 200, normal HTTP 200) loaded blocked reservedfilecheck traversal request was dropped (normal HTTP 200) after reached reserved_file_check returned ../../probe.txt outside uploads (HTTP 200, normal HTTP 200) 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.
git clone https://github.com/copper-helm/upatch-registry
cd upatch-registry
tools/build <shirudo-checkout> <keys-dir> 1.0.0 upatches/cve-2026-87791shirudo bpm push build/packages/cve-2026-87791-1.0.0.bee oci://<registry>/<namespace>/cve-2026-87791 --keys-dir <keys-dir>
shirudo bpm tree append build/packages/cve-2026-87791-1.0.0.bee oci://<registry>/<namespace>/<tree> --tree-id <tree-id> --keys-dir <keys-dir>