# CVE-2026-92980: HortusFox-Web < 6.1 Remote Code Execution via Import/Export

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

## At a glance

CVE-2026-92980 is rated High 8.6 (CVSS 4.0, CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X). It affects HortusFox (danielbrendel) and was published on 17 Sept 2026. It is not in CISA's Known Exploited Vulnerabilities catalog. Its EPSS score is 1%: the estimated chance it is exploited in the next 30 days, as of 24 Nov 2026. The upatch `cve-2026-92980-import-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-92980, published on 17 September 2026, is an unrestricted file upload vulnerability (CWE-434) in HortusFox-Web prior to version 6.1. In `app/modules/ImportModule.php`, the `importLocations`, `importPlants`, `importPlantAttachments`, `importGallery`, and `importInventory` methods extract a backup `.zip` archive into `public/backup/hf_import_<timestamp>/` and call `copy()` to move referenced asset files (`icon`, `photo`, `file`, `thumb`, and `original`) into `public/img/` or `public/attachments/` without validating the file names. An authenticated administrator—or an administrator tricked into importing a crafted backup archive—can deploy `.htaccess` files or executable PHP scripts into `public/img/` or `public/attachments/` and execute arbitrary OS commands as the web server user. Version 6.1 fixes this in commit `1c7108f23fa30759d6f3bf62f0cfbf975bdc0a3b` by adding `UtilsModule::checkUnsafeFileName()`, which rejects file names starting with `/` or `.` or ending with `.php`, `.php5`, `.php7`, `.php8`, or `.phtml`.

### Official description

HortusFox-Web prior to version 6.1 contains a remote code execution vulnerability that allows authenticated administrators to execute arbitrary OS commands as the web server user by abusing the Import/Export functionality. Attackers can leverage the Import/Export feature, which is intended solely for data portability, to deploy and execute malicious code on the underlying application server host.

## What the upatch does

One BPF LSM program attached to `lsm/inode_create` returns `-EPERM` when all of the following hold:

- The target file name being created starts with `.` (such as `.htaccess`) or ends case-insensitively with `.php`, `.php5`, `.php7`, `.php8`, or `.phtml`.
- The parent directory is named `img` or `attachments` and its parent directory is named `public` (`public/img` or `public/attachments`).
- The calling process has a command name or executable name starting with `php` (such as `php`, `php-fpm`, or `php-cgi`), `apache2`, or `httpd`.

Note that any path containing a `/` in the JSON asset name (such as `../foo.php`) resolves outside the flat `img/` or `attachments/` directory of the extracted archive unless subdirectories exist, and when `copy()` attempts to create a file in a parent directory or another directory outside `public/img` or `public/attachments`, `copy()` either fails if intermediate directories do not exist or targets `public/img` / `public/attachments` directly when placing web-accessible files there. Matching the upstream `UtilsModule::checkUnsafeFileName()` filter on `public/img` and `public/attachments` stops the creation of dot files and PHP scripts in those directories.

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

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

## Side effects

- PHP and Apache web server processes cannot create files starting with `.` or ending with `.php`, `.php5`, `.php7`, `.php8`, or `.phtml` inside any `public/img` or `public/attachments` directory.
- Normal HortusFox-Web backup imports and uploads of images and attachments (such as `.png`, `.jpg`, `.pdf`, or `.txt`) into `public/img` and `public/attachments` continue to work.
- When an imported backup archive references a blocked file name, PHP's `copy()` fails to create the destination file in `public/img/` or `public/attachments/`, and `ImportModule::import()` still cleans up the temporary `public/backup/hf_import_<timestamp>` directory.
- Other processes on the machine, including `root` shells, `cp`, `tar`, and package managers, are unaffected.

## Preemption model and cost

The program holds no state other than the `refused` per-CPU counter updated with `__sync_fetch_and_add`, making it safe under all preemption models including `PREEMPT_LAZY`, preemptible RCU, and `PREEMPT_RT`. On every `inode_create` call, the program checks the new dentry's name length and suffix/prefix first; almost all file creations return immediately after inspecting the dentry name without walking parent dentries or checking the current task.

## Affected versions

The vulnerable software is HortusFox-Web prior to version 6.1 (fixed in version 6.1).

For the Linux kernel, the BPF program uses the four-argument `inode_create` LSM hook prototype (`const struct mnt_idmap *idmap, struct inode *dir, struct dentry *dentry, umode_t mode`) with BPF LSM enabled.

## How it was tested

On a vulnerable HortusFox-Web 6.0 instance, the loaded upatch refused creating a .php file in public/img during backup import while allowing a .png image in the same backup archive to be imported.

- **Tested:** 25 Nov 2026
- **Target:** HortusFox-Web 6.0 on PHP and MariaDB, listening on 127.0.0.1:8080
- **Kernel:** 7.4-shirudo-ci-20261123
- **Architecture:** x86_64
- **Distribution:** Ubuntu 26.04

### Results

| State           | Backup import writes .php file in public/img | Backup import writes .png file in public/img |
| --------------- | -------------------------------------------- | -------------------------------------------- |
| 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-92980
```

Publish and roll out:

```sh
shirudo bpm push build/packages/cve-2026-92980-1.0.0.bee oci://<registry>/<namespace>/cve-2026-92980 --keys-dir <keys-dir>
shirudo bpm tree append build/packages/cve-2026-92980-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-92980 advisory (VulnCheck)](https://www.vulncheck.com/advisories/hortusfox-web-remote-code-execution-via-import-export)
- [HortusFox-Web v6.1 release](https://github.com/danielbrendel/hortusfox-web/releases/tag/v6.1)
- [Fix commit 1c7108f23fa30759d6f3bf62f0cfbf975bdc0a3b](https://github.com/danielbrendel/hortusfox-web/commit/1c7108f23fa30759d6f3bf62f0cfbf975bdc0a3b)

### Links

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

### More references from NVD (3)

- [github.com](https://github.com/danielbrendel/hortusfox-web/commit/1c7108f23fa30759d6f3bf62f0cfbf975bdc0a3b)
- [github.com](https://github.com/danielbrendel/hortusfox-web/releases/tag/v6.1)
- [vulncheck.com](https://www.vulncheck.com/advisories/hortusfox-web-remote-code-execution-via-import-export)
