upatch.dev

CVE-2026-82960

Apache OFBiz: Widget use-when Expression Injection Bypasses Groovy Sandbox for authenticated RCE

Refuses subprocess execution by Apache OFBiz to mitigate CVE-2026-82960.

High 8.8Vetted

EPSS 0.7%: the estimated chance this CVE is exploited in the next 30 days, as of 24 Nov 2026.

At a glance

CVE-2026-82960 is a high (CVSS 8.8) vulnerability in Apache OFBiz, published 5 November 2026. A vetted upatch, cve-2026-82960-exec-block, blocks it on running Linux machines with shirudo until Apache OFBiz is upgraded.

Severity
High 8.8 CVSS 3.1
Chance of exploitation
0.7% in the next 30 days (EPSS, 24 Nov 2026)
Known exploited
No, not on CISA’s KEV list
Weakness
CWE-94
Affected software
Apache OFBiz (Apache Software Foundation)
Upatch status
Vetted, merged into the registry
How to apply
Build, sign and roll out with shirudo

Overview

CVE-2026-82960 ("Apache OFBiz: Widget use-when Expression Injection Bypasses Groovy Sandbox for authenticated RCE") is an Improper Control of Generation of Code (CWE-94) vulnerability in ModelFormField in the Apache OFBiz cms plugin before 24.09.08. An authenticated attacker holding CMS content-editor access can submit a crafted caContentIdTo parameter in an HTTP POST request to EditAddContent. The CMS screen copies that parameter into a top-level context variable that is interpolated into a form field's use-when attribute and passed unvalidated to GroovyUtil.eval(). Because the compile-time SecureASTCustomizer sandbox does not restrict runtime reflection, a payload can close the expanded string literal, invoke java.lang.Runtime via reflection, and execute arbitrary operating system commands as the OFBiz process user.

Official description

Improper Control of Generation of Code ('Code Injection') in ModelFormField in the Apache OFBiz cms plugin before 24.09.08 on all platforms allows a remote authenticated attacker holding only CMS content-editor access to execute arbitrary operating system commands as the OFBiz process user via a single HTTP POST request, by submitting a crafted caContentIdTo parameter to EditAddContent, because the CMS screen copies that parameter into a top-level context variable that is interpolated into a form field's use-when attribute and the resulting string is passed unvalidated to GroovyUtil.eval(), whose compile-time SecureASTCustomizer sandbox does not restrict runtime reflection, allowing a payload that closes the expanded string literal and invokes java.lang.Runtime via reflection. Users are recommended to upgrade to version 24.09.08, which fixes this issue.

Affected versions

Apache OFBiz versions before 24.09.08 are affected; 24.09.08 fixes the issue.

The BPF program uses lsm/bprm_check_security and CO-RE reads against struct task_struct, struct mm_struct, struct file, and struct dentry, which are present on all shirudo-supported Linux kernels with BTF and BPF LSM enabled.

Sources

More references from NVD (1)

Mitigation

The BPF LSM program attaches to lsm/bprm_check_security and returns -EPERM when the calling task or its parent is a java executable whose command-line arguments contain ofbiz.

Hook Refused
lsm/bprm_check_security Executing any binary from an Apache OFBiz java process or its forked child

When the JVM executes an external command through java.lang.Runtime or ProcessBuilder, the child process or the calling thread reaches bprm_check_security with the OFBiz java task as either current or current->real_parent. The program checks the executable name (java) first, then inspects the first 256 bytes of the task's mm->arg_start for ofbiz, and increments the per-CPU refused counter map before returning -EPERM.

Side effects

  • Any attempt by the Apache OFBiz JVM to spawn an external operating system process fails with EPERM.
  • Normal OFBiz requests, database operations, screen rendering, and in-JVM Groovy evaluations continue to work.
  • Other Java processes on the machine whose initial arguments do not contain ofbiz, and all non-Java processes (including sshd and administrative shells), are unaffected.

Preemption model and cost

The program holds no locks and updates its per-CPU refusal counter with __sync_fetch_and_add, making it safe under all preemption models including PREEMPT_LAZY, PREEMPT_DYNAMIC, and PREEMPT_RT. On execve calls by non-Java processes, the program exits after comparing the 4-byte executable dentry length for current and current->real_parent.

The policy

95 lines of BPF C, attached at lsm/bprm_check_security.

// 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 name_is_java(const struct dentry *dentry)
{
	const unsigned char *name = BPF_CORE_READ(dentry, d_name.name);
	char buf[5] = {};

	if (!dentry || BPF_CORE_READ(dentry, d_name.len) != 4 || !name)
		return false;
	if (bpf_probe_read_kernel(buf, 4, name))
		return false;
	return buf[0] == 'j' && buf[1] == 'a' && buf[2] == 'v' && buf[3] == 'a';
}

static __always_inline bool cmdline_has_ofbiz(struct task_struct *task)
{
	unsigned long start = BPF_CORE_READ(task, mm, arg_start);
	unsigned long end = BPF_CORE_READ(task, mm, arg_end);
	unsigned long len;
	char buf[256] = {};

	if (!start || end <= start)
		return false;
	len = end - start;
	if (len > sizeof(buf))
		len = sizeof(buf);
	if (bpf_probe_read_user(buf, len, (const void *)start))
		return false;
	for (__u32 i = 0; i + 5 <= sizeof(buf); i++) {
		if (buf[i] == 'o' && buf[i + 1] == 'f' &&
		    buf[i + 2] == 'b' && buf[i + 3] == 'i' &&
		    buf[i + 4] == 'z')
			return true;
	}
	return false;
}

static __always_inline bool task_is_ofbiz_java(struct task_struct *task)
{
	const struct dentry *exe;

	if (!task)
		return false;
	exe = BPF_CORE_READ(task, mm, exe_file, f_path.dentry);
	if (!name_is_java(exe))
		return false;
	return cmdline_has_ofbiz(task);
}

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

SEC("lsm/bprm_check_security")
int BPF_PROG(cve_2026_82960_exec, struct linux_binprm *bprm, int ret)
{
	struct task_struct *task;
	struct task_struct *parent;

	if (ret)
		return earlier_verdict(ret);
	task = bpf_get_current_task_btf();
	parent = BPF_CORE_READ(task, real_parent);
	if (!task_is_ofbiz_java(task) && !task_is_ofbiz_java(parent))
		return 0;
	count_refused();
	return -EPERM;
}

Process

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

  1. 5 Nov 2026CVECVE published
  2. 25 Nov 2026Pull requestPull request #49 openedAdd CVE-2026-82960: Refuses subprocess execution by Apache OFBizromanlab
  3. 25 Nov 2026MergeMerged #49romanlab
  4. 25 Nov 2026ReviewReviewedqodo-code-review[bot] (automated)

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

Evidence

The loaded upatch refused subprocess execution (posix_spawn of /bin/true) from the Apache OFBiz java process with EPERM while normal HTTP requests continued to work. The test used a loopback OFBiz java harness rather than the full CMS screen pipeline.

Tested
25 Nov 2026
Target
Apache OFBiz java process (ofbiz.jar, org.apache.ofbiz.base.start.Start) on OpenJDK 21, loopback only
Kernel
7.4-shirudo-ci-20261123
Architecture
x86_64
Distribution
Ubuntu 26.04
Results
StateSubprocess execution from OFBiz JVM (/bin/true)Normal HTTP request (/health)
Before loadingreached (HTTP 200)200
Upatch loadedblocked (EPERM, HTTP 500)200
After unloadingreached (HTTP 200)200
tools-test.log Output of tools/test --setup showing subprocess execution reached before, blocked with EPERM while loaded, and reached after unloading.
tools/test --setup, 2026-11-25T12:38:16Z
Target: shirudo test VM, Linux 7.4-shirudo-ci-20261123, x86_64, swtpm
cve-2026-82960
  setup   done         OFBIZ_URL=http://127.0.0.1:18080
  before  reached      OFBiz java process executed /bin/true (HTTP 200)
  loaded  blocked      OFBiz java process could not execute /bin/true (BLOCKED:Cannot run program "/bin/true": posix_spawn failed, error: 1 (Operation not permitted) 
  after   reached      OFBiz java process executed /bin/true (HTTP 200)
  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.

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