# CVE-2026-88795: wpShopGermany IT-RECHT KANZLEI < 2.4 - Unauthenticated RCE via Predictable API Token

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

## At a glance

CVE-2026-88795 is rated Critical 9.0 (CVSS 3.1, CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H). It affects wpShopGermany IT-RECHT KANZLEI and was published on 17 Sept 2026. It is not in CISA's Known Exploited Vulnerabilities catalog. Its EPSS score is 0.8%: the estimated chance it is exploited in the next 30 days, as of 24 Nov 2026. The upatch `cve-2026-88795-itrecht-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-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.

## What the upatch does

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.

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

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

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

## How it was tested

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

| State           | API push writes .php file in it-recht/de | API push writes .pdf file in it-recht/de |
| --------------- | ---------------------------------------- | ---------------------------------------- |
| Before loading  | yes                                      | yes                                      |
| Upatch loaded   | no                                       | yes                                      |
| After unloading | yes                                      | 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-88795
```

Publish and roll out:

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

## Review

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

## Sources and links

- [CVE-2026-88795 record (CVE API)](https://cveawg.mitre.org/api/cve/CVE-2026-88795)
- [WPScan vulnerability entry 575afdc7-83ca-41dc-b4a0-2f8daa09ce15](https://wpscan.com/vulnerability/575afdc7-83ca-41dc-b4a0-2f8daa09ce15/)
- [Plugin 2.3 source in WordPress SVN](https://plugins.svn.wordpress.org/wpshopgermany-it-recht-kanzlei/tags/2.3/classes/wpsg_itrecht.class.php)
- [Plugin 2.4 fix in WordPress SVN](https://plugins.svn.wordpress.org/wpshopgermany-it-recht-kanzlei/tags/2.4/classes/wpsg_itrecht.class.php)

### Links

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

### More references from NVD (1)

- [wpscan.com](https://wpscan.com/vulnerability/575afdc7-83ca-41dc-b4a0-2f8daa09ce15/)
