upatch.dev

CVE-2026-76550

WP Import Export Lite < 3.9.34 - Authenticated RCE via Export Template Path Traversal

Refuses WP Import Export Lite export file creation and writes outside its export directory to mitigate CVE-2026-76550.

High 7.2Vetted

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-76550 is a high (CVSS 7.2) vulnerability in WP Import Export Lite, published 16 September 2026. A vetted upatch, cve-2026-76550-export-block, blocks it on running Linux machines with shirudo until WP Import Export Lite is upgraded.

Severity
High 7.2 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
WP Import Export Lite
Upatch status
Vetted, merged into the registry
How to apply
Build, sign and roll out with shirudo

Overview

CVE-2026-76550 affects the WP Import Export Lite WordPress plugin before version 3.9.34 (published 16 September 2026). When a user with the wpie_new_export capability saves an export template via wpie_export_save_template (WPIE_Export::save_template_data() in includes/classes/export/class-wpie-export.php), the plugin stores raw $_POST parameters into the options column of the wp_wpie_template database table. When an export runs via wpie_export_update_data, WPIE_Export_Engine::init_export() (includes/classes/export/class-wpie-export-engine.php) reads fileDir and fileName from those saved template options, constructs $dir = WPIE_UPLOAD_EXPORT_DIR . '/' . $filedir . '/' and $filepath = $dir . $filename, and opens $filepath with fopen($filepath, 'a+'), writing CSV rows controlled by fields_data into it. Because neither fileDir nor fileName is validated against directory traversal or .php extensions before opening the file, an authenticated user with export permissions can write arbitrary .php files into the WordPress tree and execute PHP code on the server.

Official description

The WP Import Export Lite WordPress plugin before 3.9.34 does not validate a user-supplied output path when writing export files, allowing users granted its export permission to write files with arbitrary names to arbitrary locations on the server, leading to remote code execution.

Affected versions

Software Affected Fixed in
WP Import Export Lite (wp-import-export-lite) < 3.9.34 3.9.34

Sources

More references from NVD (1)

Mitigation

Two BPF LSM programs (lsm/inode_create and lsm/file_open) match PHP and web server processes (php*, apache*, httpd*, lsphp*) operating inside a WordPress directory tree (wordpress, wp-content, wp-admin, or wp-includes within 8 parent directories):

Hook Refused
lsm/inode_create Creating a file outside wp-content/uploads/wp-import-export-lite/{export,import,temp,upload} or with an executable extension (.php*, .pht*, .pha*, .inc, .cgi, .sh, .hta*, .htp*, except the plugin's own index.php and .htaccess guard files)
lsm/file_open Opening any such file with FMODE_WRITE

Read-only file opens (!(file->f_mode & FMODE_WRITE)), non-PHP processes, and files outside WordPress directories return 0 immediately. Normal exports into wp-content/uploads/wp-import-export-lite/export/<hash>/<name>.csv (and .xml, .json, .xls, .xlsx, .ods, .zip) continue to work.

Side effects

  • While loaded, PHP and web server processes cannot create or open for writing new files in the WordPress tree outside wp-content/uploads/wp-import-export-lite/, such as theme/plugin edits or media uploads outside that directory, nor create .php files inside wp-import-export-lite/.
  • Serving pages, reading files, database queries, and WP Import Export Lite exports and imports using data extensions (.csv, .xml, .json, .xls, .xlsx, .ods, .zip) inside wp-content/uploads/wp-import-export-lite/ continue to work.

Preemption model and cost

The programs keep no maps or mutable state, so they are safe under every kernel preemption model, including PREEMPT_LAZY, PREEMPT_DYNAMIC, preemptible RCU, and PREEMPT_RT. On file_open, read-only opens exit after a single check of file->f_mode. On writes and file creations, non-PHP tasks exit after checking the 16-byte task comm, and paths outside a WordPress directory exit after walking at most 8 d_parent pointers.

The policy

204 lines of BPF C, attached at lsm/inode_create and lsm/file_open.

// 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
#define FMODE_WRITE	0x2

char _license[] SEC("license") = "Dual BSD/GPL";

static __always_inline bool name_is(const struct dentry *dentry,
				    const char *want, __u32 want_len)
{
	const unsigned char *name = BPF_CORE_READ(dentry, d_name.name);
	char buf[24] = {};

	if (!dentry || BPF_CORE_READ(dentry, d_name.len) != want_len ||
	    want_len > sizeof(buf) - 1)
		return false;
	if (bpf_probe_read_kernel_str(buf, sizeof(buf), name) < 0)
		return false;
	for (__u32 i = 0; i < sizeof(buf) - 1; i++) {
		if (i == want_len)
			return true;
		if (buf[i] != want[i])
			return false;
	}
	return false;
}

static __always_inline bool current_is_php_or_httpd(void)
{
	char comm[16] = {};

	if (bpf_get_current_comm(comm, sizeof(comm)))
		return false;
	if (comm[0] == 'p' && comm[1] == 'h' && comm[2] == 'p')
		return true;
	if (comm[0] == 'a' && comm[1] == 'p' && comm[2] == 'a' &&
	    comm[3] == 'c' && comm[4] == 'h' && comm[5] == 'e')
		return true;
	if (comm[0] == 'h' && comm[1] == 't' && comm[2] == 't' &&
	    comm[3] == 'p' && comm[4] == 'd')
		return true;
	if (comm[0] == 'l' && comm[1] == 's' && comm[2] == 'p' &&
	    comm[3] == 'h' && comm[4] == 'p')
		return true;
	return false;
}

static __always_inline bool has_disallowed_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 buf[64] = {};

	if (!name || len < 3 || len >= sizeof(buf))
		return false;
	if (bpf_probe_read_kernel_str(buf, sizeof(buf), name) < 0)
		return false;
	for (__u32 i = 0; i < 58; i++) {
		if (i + 3 >= len)
			break;
		if (buf[i] != '.')
			continue;
		char c1 = buf[i + 1] | 0x20;
		char c2 = buf[i + 2] | 0x20;
		char c3 = buf[i + 3] | 0x20;

		if (c1 == 'p' && c2 == 'h' &&
		    (c3 == 'p' || c3 == 't' || c3 == 'a'))
			return true;
		if (c1 == 'h' && c2 == 't' &&
		    (c3 == 'a' || c3 == 'p'))
			return true;
		if (c1 == 'i' && c2 == 'n' && c3 == 'c')
			return true;
		if (c1 == 'c' && c2 == 'g' && c3 == 'i')
			return true;
		if (c1 == 's' && c2 == 'h' &&
		    (buf[i + 3] == '\0' || buf[i + 3] == '.'))
			return true;
	}
	return false;
}

static __always_inline bool is_wpie_upload_dir(const struct dentry *d)
{
	return name_is(d, "wp-import-export-lite", 21);
}

static __always_inline bool is_wpie_subdir(const struct dentry *d)
{
	return name_is(d, "export", 6) ||
	       name_is(d, "import", 6) ||
	       name_is(d, "temp", 4) ||
	       name_is(d, "upload", 6);
}

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

	if (is_wpie_upload_dir(dir))
		return true;
	if (is_wpie_subdir(dir) && is_wpie_upload_dir(p1))
		return true;
	if (is_wpie_subdir(p1) && is_wpie_upload_dir(p2))
		return true;
	if (is_wpie_subdir(p2) && is_wpie_upload_dir(p3))
		return true;
	if (is_wpie_subdir(p3) && is_wpie_upload_dir(p4))
		return true;
	return false;
}

static __always_inline bool is_under_wp_tree(const struct dentry *dir)
{
	const struct dentry *cur = dir;

	for (int i = 0; i < 8; i++) {
		if (!cur)
			break;
		if (name_is(cur, "wp-content", 10) ||
		    name_is(cur, "wp-admin", 8) ||
		    name_is(cur, "wp-includes", 11) ||
		    name_is(cur, "wordpress", 9))
			return true;
		const struct dentry *parent = BPF_CORE_READ(cur, d_parent);

		if (parent == cur)
			break;
		cur = parent;
	}
	return false;
}

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

	if (name_is(dentry, "index.php", 9) || name_is(dentry, ".htaccess", 9)) {
		if (is_wpie_upload_dir(dir) ||
		    (is_wpie_subdir(dir) && is_wpie_upload_dir(p1)) ||
		    (is_wpie_subdir(p1) && is_wpie_upload_dir(p2)))
			return true;
		return false;
	}
	if (has_disallowed_ext(dentry))
		return false;
	return is_allowed_wpie_dir(dir);
}

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

SEC("lsm/inode_create")
int BPF_PROG(cve_2026_76550_create, const struct mnt_idmap *idmap,
	     struct inode *dir, struct dentry *dentry, umode_t mode, int ret)
{
	const struct dentry *parent;

	if (ret)
		return earlier_verdict(ret);
	if (!current_is_php_or_httpd())
		return 0;
	parent = BPF_CORE_READ(dentry, d_parent);
	if (!is_under_wp_tree(parent))
		return 0;
	if (is_allowed_export_file(dentry))
		return 0;
	return -EPERM;
}

SEC("lsm/file_open")
int BPF_PROG(cve_2026_76550_open, struct file *file, int ret)
{
	const struct dentry *dentry;
	const struct dentry *parent;

	if (ret)
		return earlier_verdict(ret);
	if (!(BPF_CORE_READ(file, f_mode) & FMODE_WRITE))
		return 0;
	if (!current_is_php_or_httpd())
		return 0;
	dentry = BPF_CORE_READ(file, f_path.dentry);
	parent = BPF_CORE_READ(dentry, d_parent);
	if (!is_under_wp_tree(parent))
		return 0;
	if (is_allowed_export_file(dentry))
		return 0;
	return -EPERM;
}

Process

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

  1. 16 Sept 2026CVECVE published
  2. 25 Nov 2026Pull requestPull request #44 openedAdd CVE-2026-76550: Refuses WP Import Export Lite export file creation and writes outside itsromanlab
  3. 25 Nov 2026MergeMerged #44romanlab
  4. 25 Nov 2026ReviewReviewedqodo-code-review[bot] (automated)

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

Evidence

On WordPress 6.7.2 with WP Import Export Lite 3.9.32, the loaded upatch refused the traversal export file creation in wp-content/uploads during wpie_export_update_data, while before and after loading the export completed.

Tested
25 Nov 2026
Target
WordPress 6.7.2 with WP Import Export Lite 3.9.32 on PHP, loopback only
Kernel
7.4-shirudo-ci-20261123
Architecture
x86_64
Results
Statewpie_export_update_data with traversal fileDir/fileName
Before loadingcompleted (exported_records=1)
Upatch loadedblocked (export file creation refused)
After unloadingcompleted (exported_records=1)
tools-test.log Output of tools/test --setup on the shirudo test VM.
tools/test --setup, 2026-11-25T12:11:04Z
Target: shirudo test VM, Linux 7.4-shirudo-ci-20261123, x86_64, swtpm
cve-2026-76550
  setup   done         WPIE_URL=http://127.0.0.1:18080 WPIE_WP_DIR=/opt/upatch-payload/cve-2026-76550/wordpress WPIE_USER=admin WPIE_PASS=adminpass
  before  unsupported  export finished without writing wpie-probe-f2ef6e60f915.php: {'status': 'success', 'exported_records': 1, 'export_status': 'completed'}
  loaded  blocked      export file creation outside export directory was refused
  after   unsupported  export finished without writing wpie-probe-e6c2044d7f5f.php: {'status': 'success', 'exported_records': 1, 'export_status': 'completed'}
  PASS: blocked while loaded; this machine lacks the vulnerable feature, so only the refusal was shown

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-76550
Publish and roll out
shirudo bpm push build/packages/cve-2026-76550-1.0.0.bee oci://<registry>/<namespace>/cve-2026-76550 --keys-dir <keys-dir>
shirudo bpm tree append build/packages/cve-2026-76550-1.0.0.bee oci://<registry>/<namespace>/<tree> --tree-id <tree-id> --keys-dir <keys-dir>