upatch.dev

CVE-2026-88795

wpShopGermany IT-RECHT KANZLEI < 2.4 - Unauthenticated RCE via Predictable API Token

Refuses non-PDF file creation in the wpShopGermany IT-RECHT KANZLEI upload directory to mitigate CVE-2026-88795.

Critical 9.0Vetted

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

At a glance

CVE-2026-88795 is a critical (CVSS 9.0) vulnerability in wpShopGermany IT-RECHT KANZLEI, published 17 September 2026. A vetted upatch, cve-2026-88795-itrecht-block, blocks it on running Linux machines with shirudo until wpShopGermany IT-RECHT KANZLEI is upgraded.

Severity
Critical 9.0 CVSS 3.1
Chance of exploitation
0.8% in the next 30 days (EPSS, 24 Nov 2026)
Known exploited
No, not on CISA’s KEV list
Weakness
CWE-94
Affected software
wpShopGermany IT-RECHT KANZLEI
Upatch status
Vetted, merged into the registry
How to apply
Build, sign and roll out with shirudo

Overview

CVE-2026-88795, "wpShopGermany IT-RECHT KANZLEI < 2.4 - Unauthenticated RCE via Predictable API Token", was published on 17 September 2026. In versions before 2.4 of the wpshopgermany-it-recht-kanzlei WordPress plugin, wpsg_itrecht::getAPIKey() generates and stores a new API token as a side effect of checking user_auth_token during an /?wpsgitrecht_action=api request when no token is configured yet. Because wpsg_itrecht::getNewApiKey() derives that 42-character token by base64-encoding and shuffling a string containing $_SERVER['REQUEST_URI'], an unauthenticated requester who pads the request URI with a long run of U bytes forces every character of the generated token to be V, passes the token check in the same request, and reaches the push action. The push handler writes the base64-decoded <rechtstext_pdf> element to wp-content/uploads/it-recht/<post_id>/<lang>/<file_name>, taking <file_name> from <rechtstext_pdf_filename_suggestion> after sanitize_file_name() without restricting the extension, which lets an attacker write a .php file under the web root and execute code.

Official description

The wpShopGermany IT-RECHT KANZLEI WordPress plugin before 2.4 does not generate its API authentication token securely, deriving it from data the requester controls and creating it as a side effect of the check that is supposed to validate it, allowing unauthenticated attackers to predict the token and use the access it grants to write arbitrary files, leading to remote code execution.

Affected versions

Software Affected Fixed in
wpShopGermany IT-RECHT KANZLEI (wpshopgermany-it-recht-kanzlei) before 2.4 (tested on 2.3) 2.4

Kernels: the program uses the four-argument inode_create LSM hook prototype (idmap, dir, dentry, mode) of mainline Linux and bpf-next.

Sources

More references from NVD (1)

Mitigation

It attaches to lsm/inode_create and returns -EPERM when all of the following hold:

  • The new file's name does not end in .pdf (case-insensitively) with at least one character before the extension.
  • One of its three immediate ancestor directories is named it-recht (matching both wp-content/uploads/it-recht//<lang>/<file> when no page ID is configured and wp-content/uploads/it-recht/<post_id>/<lang>/<file> when one is).
  • The current task's executable or command name starts with php or its executable is apache2.

This enforces at the kernel level the same filename restriction that version 2.4's buildPdfFileName() adds in PHP, where uploaded legal text attachments are forced to have a .pdf suffix. A refusal from an earlier BPF LSM program on the same hook is passed on unchanged.

The refused per-CPU array counts refused file creations at key 0.

Side effects

  • PHP and Apache processes cannot create files without a .pdf extension inside a directory named it-recht or up to two directory levels below it.
  • Legitimate .pdf legal text files pushed by IT-Recht Kanzlei into wp-content/uploads/it-recht/... continue to be written normally.
  • Non-PHP processes, including root maintenance shells, package managers and backup tools, are unaffected.

Preemption model and cost

The program keeps no state beyond the per-CPU refusal counter, which it updates with __sync_fetch_and_add, so it is safe under every preemption model, including preemptible RCU, PREEMPT_LAZY and PREEMPT_RT. On file creations outside it-recht, .pdf files return after checking the 4-byte suffix, and other files return after checking the parent directory names (d_name.len != 8 on the first parent in almost all cases) before inspecting the current task.

The policy

112 lines of BPF C, attached at lsm/inode_create.

// 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 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 bool ends_with_pdf(const struct dentry *dentry)
{
	const unsigned char *name = BPF_CORE_READ(dentry, d_name.name);
	__u32 len = BPF_CORE_READ(dentry, d_name.len);
	char tail[4] = {};

	if (len < 5 || len > 255)
		return false;
	if (!name || bpf_probe_read_kernel(tail, sizeof(tail), name + len - 4))
		return false;
	return tail[0] == '.' &&
	       (tail[1] == 'p' || tail[1] == 'P') &&
	       (tail[2] == 'd' || tail[2] == 'D') &&
	       (tail[3] == 'f' || tail[3] == 'F');
}

static __always_inline bool dentry_is_it_recht(const struct dentry *dentry)
{
	const unsigned char *name = BPF_CORE_READ(dentry, d_name.name);
	__u32 len = BPF_CORE_READ(dentry, d_name.len);
	char buf[8] = {};

	if (!dentry || len != 8)
		return false;
	if (!name || bpf_probe_read_kernel(buf, sizeof(buf), name))
		return false;
	return buf[0] == 'i' && buf[1] == 't' && buf[2] == '-' &&
	       buf[3] == 'r' && buf[4] == 'e' && buf[5] == 'c' &&
	       buf[6] == 'h' && buf[7] == 't';
}

static __always_inline bool under_it_recht_dir(const struct dentry *dentry)
{
	const struct dentry *p1 = BPF_CORE_READ(dentry, d_parent);
	const struct dentry *p2 = BPF_CORE_READ(p1, d_parent);
	const struct dentry *p3 = BPF_CORE_READ(p2, d_parent);

	return dentry_is_it_recht(p1) || dentry_is_it_recht(p2) ||
	       dentry_is_it_recht(p3);
}

static __always_inline bool has_php_prefix(const char *s)
{
	return s[0] == 'p' && s[1] == 'h' && s[2] == 'p';
}

static __always_inline bool current_is_php(void)
{
	struct task_struct *task = bpf_get_current_task_btf();
	const struct dentry *exe = BPF_CORE_READ(task, mm, exe_file, f_path.dentry);
	const unsigned char *name = BPF_CORE_READ(exe, d_name.name);
	char buf[8] = {};

	if (name && !bpf_probe_read_kernel(buf, sizeof(buf), name)) {
		if (has_php_prefix(buf))
			return true;
		if (buf[0] == 'a' && buf[1] == 'p' && buf[2] == 'a' &&
		    buf[3] == 'c' && buf[4] == 'h' && buf[5] == 'e' &&
		    buf[6] == '2')
			return true;
	}
	if (bpf_get_current_comm(buf, sizeof(buf)) == 0 && has_php_prefix(buf))
		return true;
	return false;
}

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

SEC("lsm/inode_create")
int BPF_PROG(cve_2026_88795_create, const struct mnt_idmap *idmap,
	     struct inode *dir, struct dentry *dentry, umode_t mode, int ret)
{
	if (ret)
		return earlier_verdict(ret);
	if (ends_with_pdf(dentry))
		return 0;
	if (!under_it_recht_dir(dentry) || !current_is_php())
		return 0;
	count_refused();
	return -EPERM;
}

Process

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

  1. 17 Sept 2026CVECVE published
  2. 25 Nov 2026Pull requestPull request #46 openedAdd CVE-2026-88795: Refuses non-PDF file creation in the wpShopGermany IT-RECHT KANZLEI uploadromanlab
  3. 25 Nov 2026MergeMerged #46romanlab
  4. 25 Nov 2026ReviewReviewedqodo-code-review[bot] (automated)

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

Evidence

On wpShopGermany IT-RECHT KANZLEI 2.3 in its unconfigured default state, the loaded upatch refused creation of a .php file in wp-content/uploads/it-recht/de while allowing .pdf legal text uploads.

Tested
25 Nov 2026
Target
wpShopGermany IT-RECHT KANZLEI 2.3 on PHP 8, unconfigured default state, loopback only
Kernel
7.4-shirudo-ci-20261123
Architecture
x86_64
Distribution
Ubuntu 26.04
Results
StateAPI push writes .php file in it-recht/deAPI push writes .pdf file in it-recht/de
Before loadingyesyes
Upatch loadednoyes
After unloadingyesyes
tools-test.log Output of tools/test --setup before, while and after loading the upatch.
tools/test --setup, 2026-11-25T12:20:31Z
Target: shirudo test VM, Linux 7.4-shirudo-ci-20261123, x86_64, swtpm
cve-2026-88795
  setup   done         WPSG_ITRECHT_URL=http://127.0.0.1:18795 WPSG_ITRECHT_UPLOADS=/opt/upatch-payload/cve-2026-88795/wp-content/uploads WPSG_ITRECHT_TOKEN_FILE=/opt/upatch-payload/cve-2026-88795/state/opt_wpsgitrecht_apiToken
  before  reached      API push wrote probe-032c7ee54f60.php in it-recht/de (removed); .pdf write also succeeded
  loaded  blocked      API push could not create probe-58c61fcc1373.php in it-recht/de while .pdf write succeeded
  after   reached      API push wrote probe-5a674b629905.php in it-recht/de (removed); .pdf write also succeeded
  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-88795
Publish and roll out
shirudo bpm push build/packages/cve-2026-88795-1.0.0.bee oci://<registry>/<namespace>/cve-2026-88795 --keys-dir <keys-dir>
shirudo bpm tree append build/packages/cve-2026-88795-1.0.0.bee oci://<registry>/<namespace>/<tree> --tree-id <tree-id> --keys-dir <keys-dir>