CVE-2026-9843
Database for Contact Form 7, WPforms, Elementor forms <= 1.5.1 - Unauthenticated Arbitrary File Deletion via CF7 File Field POST Value
Refuses php file deletion outside the crm_perks_uploads directory to mitigate CVE-2026-9843.
High 8.1Vetted
EPSS 1.0%: the estimated chance this CVE is exploited in the next 30 days, as of 24 Nov 2026.
NVDCVE.orgDatabase for Contact Form 7, WPforms, Elementor forms, published 20 Jun 2026
At a glance
CVE-2026-9843 is a high (CVSS 8.1) vulnerability in Database for Contact Form 7, WPforms, Elementor forms, published 20 June 2026. A vetted upatch, cve-2026-9843-unlink-block, blocks it on running Linux machines with shirudo until Database for Contact Form 7, WPforms, Elementor forms is upgraded.
- Severity
- High 8.1 CVSS 3.1
- Chance of exploitation
- 1.0% in the next 30 days (EPSS, 24 Nov 2026)
- Known exploited
- No, not on CISA’s KEV list
- Weakness
- CWE-22
- Affected software
- Database for Contact Form 7, WPforms, Elementor forms (crmperks)
- Upatch status
- Vetted, merged into the registry
- How to apply
- Build, sign and roll out with shirudo
Overview
CVE-2026-9843, published on 20 June 2026, is an unauthenticated arbitrary file deletion vulnerability (CWE-22) in the "Database for Contact Form 7, WPforms, Elementor forms" (contact-form-entries) WordPress plugin in all versions up to and including 1.5.1. In includes/plugin-pages.php, view_page() processes form entry updates when an administrator saves an entry ($_POST['vxcf_leads_submit']). For each field of type file, it loads stored attachment paths from the entry detail table ($detail[$name]['value']) and checks whether isset($_POST['files_'.$name][$k]) holds. In templates/view.php (line 559), the hidden input name is rendered as files_<?php echo esc_html($f_name.'['.$k.']') ?> without stripping [ or ] from the stored key $k. An unauthenticated attacker who submits a poisoned entry with a bracketed key and a relative traversal path (such as ../../../../wp-config.php) causes PHP's bracket parser to reshape $_POST['files_'.$name] when the administrator edits and saves the entry, so isset($_POST['files_'.$name][$k]) evaluates to false and view_page() executes @unlink($upload['dir'].$file) (line 1197) on the traversal target. Version 1.5.2 (changeset 3578556) fixed this by sanitizing [ and ] in templates/view.php and resolving $real_file = realpath($upload['dir'].$file) in includes/plugin-pages.php before checking strpos($real_file, '/crm_perks_uploads/') !== false.
Official description
The Database for Contact Form 7, WPforms, Elementor forms plugin for WordPress is vulnerable to arbitrary file deletion due to insufficient file path validation in the view_page function in all versions up to, and including, 1.5.1. This makes it possible for unauthenticated attackers to delete arbitrary files on the server, which can easily lead to remote code execution when the right file is deleted (such as wp-config.php). Successful exploitation requires an administrator to view or edit the poisoned form entry, at which point PHP's bracket parser reshapes the attacker-crafted JSON key to bypass the stored-path isset check and trigger deletion of the traversal-specified file.
Affected versions
- WordPress plugin
contact-form-entries(Database for Contact Form 7, WPforms, Elementor forms): all versions up to and including 1.5.1; fixed in 1.5.2. - Affected kernels: any Linux kernel supporting BPF LSM (
lsm/inode_unlink) with BTF enabled.
Sources
- Wordfence vulnerability record for CVE-2026-9843
- WordPress Plugin Trac changeset 3578556
- Vulnerable unlink in includes/plugin-pages.php (tag 1.5.1, line 1197)
- Vulnerable hidden input in templates/view.php (tag 1.5.1, line 559)
- Entry data handling in includes/data.php (tag 1.5.1, line 539)
- Form entry handling in contact-form-entries.php (tag 1.5.1, lines 435 and 747)
Mitigation
The BPF LSM program attaches to lsm/inode_unlink and inspects unlink attempts by tasks whose executable basename starts with php (matching php, php8.3, php-fpm8.3, and php-cgi):
| Hook | Refused |
|---|---|
lsm/inode_unlink |
Unlinking any file by a php* executable unless one of its ancestor directories (within 6 levels) is named crm_perks_uploads |
When the kernel resolves the path passed to unlink(), any .. traversal components are already resolved in the VFS before security_inode_unlink() runs, so dentry and its d_parent chain reflect the real target location on disk. Legitimate attachment deletions under wp-content/uploads/crm_perks_uploads/<random_folder>/<YYYY>/<MM>/<file> have crm_perks_uploads as the third parent directory and are allowed; traversal targets outside crm_perks_uploads (such as wp-config.php) lack crm_perks_uploads in their ancestor chain and are refused with -EPERM. The refused per-CPU array map counts refused unlink attempts at key 0.
Side effects
- While the upatch is loaded, PHP processes (
php*) cannot unlink files outside acrm_perks_uploadsdirectory subtree. WordPress core updates, plugin uninstalls, media deletions outsidecrm_perks_uploads, and temporary file unlinks performed directly by PHP fail withEPERMuntil the plugin is upgraded to 1.5.2 and the upatch is unloaded. - Viewing, editing, saving entries, and removing legitimate entry attachments inside
crm_perks_uploadscontinue to work normally. - Non-PHP processes (including root shells,
sshd, package managers, and web servers running outside aphp*binary) are unaffected.
Preemption model and cost
The program uses a single BPF_MAP_TYPE_PERCPU_ARRAY counter updated with __sync_fetch_and_add only on refused operations, so it is safe under all preemption models including PREEMPT_LAZY, PREEMPT_DYNAMIC, and PREEMPT_RT. For non-PHP tasks, each inode_unlink call exits after checking the current task's executable prefix (3 bytes). For PHP tasks, it walks at most 6 d_parent pointers.
The policy
98 lines of BPF C, attached at lsm/inode_unlink.
// 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 is_php_process(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);
__u32 len = BPF_CORE_READ(exe, d_name.len);
char buf[4] = {};
if (!name || len < 3)
return false;
if (bpf_probe_read_kernel(buf, 3, name))
return false;
return buf[0] == 'p' && buf[1] == 'h' && buf[2] == 'p';
}
static __always_inline bool is_crm_perks_uploads(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[18] = {};
if (!name || len != 17)
return false;
if (bpf_probe_read_kernel(buf, 17, name))
return false;
return buf[0] == 'c' && buf[1] == 'r' && buf[2] == 'm' &&
buf[3] == '_' && buf[4] == 'p' && buf[5] == 'e' &&
buf[6] == 'r' && buf[7] == 'k' && buf[8] == 's' &&
buf[9] == '_' && buf[10] == 'u' && buf[11] == 'p' &&
buf[12] == 'l' && buf[13] == 'o' && buf[14] == 'a' &&
buf[15] == 'd' && buf[16] == 's';
}
static __always_inline bool inside_crm_perks_uploads(const struct dentry *dentry)
{
const struct dentry *cur = BPF_CORE_READ(dentry, d_parent);
for (int i = 0; i < 6; i++) {
const struct dentry *parent;
if (!cur)
return false;
if (is_crm_perks_uploads(cur))
return true;
parent = BPF_CORE_READ(cur, d_parent);
if (parent == cur)
return false;
cur = parent;
}
return false;
}
static __always_inline int earlier_verdict(int ret)
{
return ret >= -4095 && ret < 0 ? ret : -EPERM;
}
SEC("lsm/inode_unlink")
int BPF_PROG(cve_2026_9843_unlink_block, struct inode *dir,
struct dentry *dentry, int ret)
{
if (ret)
return earlier_verdict(ret);
if (!is_php_process())
return 0;
if (inside_crm_perks_uploads(dentry))
return 0;
count_refused();
return -EPERM;
}
The package: name, license, the program and the CVE it fixes.
[package]
name = "cve-2026-9843"
description = "Refuses php file deletion outside the crm_perks_uploads directory to mitigate CVE-2026-9843"
license = "GPL-2.0 OR BSD-2-Clause"
[[upatches]]
source = "cve-2026-9843-unlink-block.bpf.c"
[upatches.tree]
id = "cve-2026-9843-unlink-block"
fixes = ["CVE-2026-9843"]
Process
How this upatch was written, checked and reviewed, from the registry’s history.
- 20 Jun 2026CVECVE published
- 25 Nov 2026Pull requestPull request #37 openedAdd CVE-2026-9843: Refuses php file deletion outside the crm_perks_uploads directoryromanlab
- 25 Nov 2026MergeMerged #37romanlab
- 25 Nov 2026ReviewReviewedqodo-code-review[bot] (automated)
No human review is recorded on GitHub for this upatch yet.
Evidence
On WordPress Contact Form Entries (contact-form-entries) 1.5.1, the loaded upatch blocked the path-traversal file deletion in view_page() outside crm_perks_uploads while allowing legitimate attachment deletion inside crm_perks_uploads.
- Tested
- 25 Nov 2026
- Target
- WordPress Contact Form Entries (contact-form-entries) 1.5.1 on PHP CLI built-in web server, loopback only
- Kernel
- 7.4-shirudo-ci-20261123
- Architecture
- x86_64
- Distribution
- Ubuntu 26.04
| State | Path-traversal unlink outside crm_perks_uploads blocked | Legitimate attachment unlink inside crm_perks_uploads works |
|---|---|---|
| Before loading | no | yes |
| Upatch loaded | yes | yes |
| After unloading | no | yes |
tools-test.log Output of tools/test --setup showing view_page() unlinking the traversal probe before and after, and being blocked while the upatch is loaded.
tools/test --setup, 2026-11-25T11:49:21Z Target: shirudo test VM, Linux 7.4-shirudo-ci-20261123, x86_64, swtpm cve-2026-9843 setup done CFE_URL=http://127.0.0.1:18080/index.php CFE_TOP=/opt/upatch-payload/cve-2026-9843 before reached view_page unlinked probe-0b6dfb5fa641.txt outside crm_perks_uploads via path traversal loaded blocked view_page could not unlink probe-04e106d2808b.txt outside crm_perks_uploads while legitimate attachment deletion succeeded after reached view_page unlinked probe-7e450d320d38.txt outside crm_perks_uploads via path traversal 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-9843shirudo bpm push build/packages/cve-2026-9843-1.0.0.bee oci://<registry>/<namespace>/cve-2026-9843 --keys-dir <keys-dir>
shirudo bpm tree append build/packages/cve-2026-9843-1.0.0.bee oci://<registry>/<namespace>/<tree> --tree-id <tree-id> --keys-dir <keys-dir>