CVE-2026-82901
Ultra Addons for Contact Form 7 <= 3.5.50 - Unauthenticated Arbitrary File Upload via Signature Form Field
Refuses dangerous file creation in uacf7-uploads by PHP processes to mitigate CVE-2026-82901.
Critical 9.8Vetted
EPSS 4.3%: the estimated chance this CVE is exploited in the next 30 days, as of 24 Nov 2026.
NVDCVE.orgUltra Addons for Contact Form 7, published 26 Sept 2026
At a glance
CVE-2026-82901 is a critical (CVSS 9.8) vulnerability in Ultra Addons for Contact Form 7, published 26 September 2026. A vetted upatch, cve-2026-82901-upload-block, blocks it on running Linux machines with shirudo until Ultra Addons for Contact Form 7 is upgraded.
- Severity
- Critical 9.8 CVSS 3.1
- Chance of exploitation
- 4.3% in the next 30 days (EPSS, 24 Nov 2026)
- Known exploited
- No, not on CISA’s KEV list
- Weakness
- CWE-434
- Affected software
- Ultra Addons for Contact Form 7 (themefic)
- Upatch status
- Vetted, merged into the registry
- How to apply
- Build, sign and roll out with shirudo
Overview
CVE-2026-82901 is an unauthenticated arbitrary file upload vulnerability in the Ultra Addons for Contact Form 7 (ultimate-addons-for-contact-form-7) WordPress plugin in all versions up to and including 3.5.50, published on 26 September 2026. When the plugin's PDF Generator module is enabled (uacf7_enable_pdf_generator), the uacf7_wpcf7_mail_components function in addons/pdf-generator/pdf-generator.php copies uploaded form files into wp-content/uploads/uacf7-uploads/ under $time_now . '-' . $file_key . '-' . sanitize_file_name(basename($file)) without validating the file extension or MIME type. An unauthenticated attacker can submit a form containing a .php script or other dangerous file, which is written into the publicly accessible uacf7-uploads directory and allows remote code execution.
Official description
The Ultra Addons for Contact Form 7 plugin for WordPress is vulnerable to Arbitrary File Upload due to insufficient file type validation in the 'uacf7_wpcf7_mail_components' function in all versions up to, and including, 3.5.50. This makes it possible for unauthenticated attackers to upload arbitrary files on the affected site's server which may make remote code execution possible. Note: This is only exploitable when the plugin's PDF Generator module is enabled, which is disabled by default.
Affected versions
Ultra Addons for Contact Form 7 (ultimate-addons-for-contact-form-7):
| Branch | Affected | Fixed in |
|---|---|---|
| 3.5 | up to and including 3.5.50 | 3.5.51 |
Kernels: Linux kernels with BPF LSM and the four-argument inode_create LSM hook taking const struct mnt_idmap *idmap first.
Sources
Mitigation
One BPF LSM program attached to lsm/inode_create returns -EPERM when a process whose executable starts with php (such as php, php8.3, php8.4, php8.5, php-fpm8.3, php-fpm8.4 or php-fpm8.5) or is named apache2 attempts to create a file inside a directory named uacf7-uploads unless the file name ends with one of the safe extensions allowed by the 3.5.51 fix (.pdf, .png, .jpg, .jpeg, .jpe, .gif, .webp, .txt, .doc, .docx, matched case-insensitively).
The refused per-CPU array counts refused file creations at key 0.
Side effects
- PHP and Apache processes cannot create files in
uacf7-uploadswhose extensions are outside.pdf,.png,.jpg,.jpeg,.jpe,.gif,.webp,.txt,.docand.docx. This matches the extension whitelist introduced by upstream version 3.5.51 inaddons/pdf-generator/pdf-generator.php. - Generated PDFs (
.pdf), signature images (.png,.jpg,.jpeg) and allowed document/image attachments inuacf7-uploadscontinue to work normally. - Non-PHP/Apache processes (such as administrative shell commands) 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, making it safe under every preemption model including preemptible RCU and PREEMPT_LAZY. On every file creation outside uacf7-uploads, the program returns after a single check of the parent directory's 13-byte name length (d_parent->d_name.len != 13).
The policy
141 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";
enum {
REFUSED_CREATE,
NR_COUNTERS,
};
struct {
__uint(type, BPF_MAP_TYPE_PERCPU_ARRAY);
__uint(max_entries, NR_COUNTERS);
__type(key, __u32);
__type(value, __u64);
} refused SEC(".maps");
static __always_inline void count(__u32 key)
{
__u64 *value = bpf_map_lookup_elem(&refused, &key);
if (value)
__sync_fetch_and_add(value, 1);
}
static __always_inline char lower_ascii(char c)
{
if (c >= 'A' && c <= 'Z')
return c + ('a' - 'A');
return c;
}
static __always_inline bool is_uacf7_uploads(const struct dentry *dentry)
{
const unsigned char *name;
char buf[16] = {};
const char want[] = "uacf7-uploads";
if (!dentry || BPF_CORE_READ(dentry, d_name.len) != 13)
return false;
name = BPF_CORE_READ(dentry, d_name.name);
if (!name || bpf_probe_read_kernel(buf, 13, name))
return false;
for (int i = 0; i < 13; i++) {
if (buf[i] != want[i])
return false;
}
return true;
}
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;
__u32 len;
char buf[8] = {};
if (!exe)
return false;
len = BPF_CORE_READ(exe, d_name.len);
name = BPF_CORE_READ(exe, d_name.name);
if (!name || len < 3)
return false;
if (bpf_probe_read_kernel_str(buf, sizeof(buf), name) < 0)
return false;
if (buf[0] == 'p' && buf[1] == 'h' && buf[2] == 'p')
return true;
if (len == 7 && buf[0] == 'a' && buf[1] == 'p' && buf[2] == 'a' &&
buf[3] == 'c' && buf[4] == 'h' && buf[5] == 'e' && buf[6] == '2')
return true;
return false;
}
static __always_inline bool is_allowed_ext(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[5] = {};
char c0, c1, c2, c3, c4;
if (!name || len < 5 || len > 255)
return false;
if (bpf_probe_read_kernel(tail, sizeof(tail), name + len - 5))
return false;
c0 = lower_ascii(tail[0]);
c1 = lower_ascii(tail[1]);
c2 = lower_ascii(tail[2]);
c3 = lower_ascii(tail[3]);
c4 = lower_ascii(tail[4]);
if (c1 == '.') {
if (c2 == 'p' && c3 == 'd' && c4 == 'f')
return true;
if (c2 == 'p' && c3 == 'n' && c4 == 'g')
return true;
if (c2 == 'j' && c3 == 'p' && (c4 == 'g' || c4 == 'e'))
return true;
if (c2 == 'g' && c3 == 'i' && c4 == 'f')
return true;
if (c2 == 't' && c3 == 'x' && c4 == 't')
return true;
if (c2 == 'd' && c3 == 'o' && c4 == 'c')
return true;
}
if (c0 == '.') {
if (c1 == 'j' && c2 == 'p' && c3 == 'e' && c4 == 'g')
return true;
if (c1 == 'w' && c2 == 'e' && c3 == 'b' && c4 == 'p')
return true;
if (c1 == 'd' && c2 == 'o' && c3 == 'c' && c4 == 'x')
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_82901_create, const struct mnt_idmap *idmap,
struct inode *dir, struct dentry *dentry, umode_t mode, int ret)
{
if (ret)
return earlier_verdict(ret);
if (!is_uacf7_uploads(BPF_CORE_READ(dentry, d_parent)))
return 0;
if (is_allowed_ext(dentry) || !current_is_php())
return 0;
count(REFUSED_CREATE);
return -EPERM;
}
The package: name, license, the program and the CVE it fixes.
[package]
name = "cve-2026-82901"
description = "Refuses dangerous file creation in uacf7-uploads by PHP processes to mitigate CVE-2026-82901"
license = "GPL-2.0 OR BSD-2-Clause"
[[upatches]]
source = "cve-2026-82901-upload-block.bpf.c"
[upatches.tree]
id = "cve-2026-82901-upload-block"
fixes = ["CVE-2026-82901"]
Process
How this upatch was written, checked and reviewed, from the registry’s history.
- 26 Sept 2026CVECVE published
- 25 Nov 2026Pull requestPull request #11 openedAdd CVE-2026-82901: Refuses dangerous file creation in uacf7-uploads by PHP processesromanlab
- 25 Nov 2026ReviewReviewedqodo-code-review[bot] (automated)
- 25 Nov 2026MergeMerged #11romanlab
No human review is recorded on GitHub for this upatch yet.
Evidence
On a vulnerable Ultra Addons for Contact Form 7 3.5.50 installation with the PDF Generator module enabled, the loaded upatch refused creation of the uploaded .php probe file in uacf7-uploads while before and after runs wrote the file.
- Tested
- 25 Nov 2026
- Target
- WordPress 6.7.2 with Ultra Addons for Contact Form 7 3.5.50 (PDF Generator enabled) on PHP 8.5.4, loopback only
- Kernel
- 7.4-shirudo-ci-20261123
- Architecture
- x86_64
- Distribution
- Ubuntu 26.04
| State | uacf7_wpcf7_mail_components writes .php file in uacf7-uploads |
|---|---|
| Before loading | yes (HTTP 200) |
| Upatch loaded | no (HTTP 500, EPERM) |
| After unloading | yes (HTTP 200) |
tools-test.log Output of tools/test --setup showing reached before, blocked while the upatch was loaded, and reached again after unloading.
tools/test --setup, 2026-11-25T10:21:58Z Target: shirudo test VM, Linux 7.4-shirudo-ci-20261123, x86_64, swtpm cve-2026-82901 setup done UACF7_URL=http://127.0.0.1:8080/ UACF7_UPLOADS_DIR=/opt/upatch-payload/cve-2026-82901/wordpress/wp-content/uploads/uacf7-uploads UACF7_FORM_ID=1 UACF7_FIELD=uacf7-file before reached uacf7_wpcf7_mail_components wrote 1795602090-uacf7-file-upatch-probe-cac06b32a64b.php in uacf7-uploads (HTTP 200); removed it loaded blocked uacf7_wpcf7_mail_components could not create upatch-probe-834ff3465908.php in uacf7-uploads (HTTP 500) after reached uacf7_wpcf7_mail_components wrote 1795602098-uacf7-file-upatch-probe-3209db3a2609.php in uacf7-uploads (HTTP 200); removed it 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-82901shirudo bpm push build/packages/cve-2026-82901-1.0.0.bee oci://<registry>/<namespace>/cve-2026-82901 --keys-dir <keys-dir>
shirudo bpm tree append build/packages/cve-2026-82901-1.0.0.bee oci://<registry>/<namespace>/<tree> --tree-id <tree-id> --keys-dir <keys-dir>