# CVE-2026-82960: Apache OFBiz: Widget use-when Expression Injection Bypasses Groovy Sandbox for authenticated RCE

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

## At a glance

CVE-2026-82960 is rated High 8.8 (CVSS 3.1, CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H). It affects Apache OFBiz (Apache Software Foundation) and was published on 5 Nov 2026. It is not in CISA's Known Exploited Vulnerabilities catalog. Its EPSS score is 0.7%: the estimated chance it is exploited in the next 30 days, as of 24 Nov 2026. The upatch `cve-2026-82960-exec-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-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.

## What the upatch does

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`.

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

## 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`.

## 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.

## How it was tested

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

| State           | Subprocess execution from OFBiz JVM (/bin/true) | Normal HTTP request (/health) |
| --------------- | ----------------------------------------------- | ----------------------------- |
| Before loading  | reached (HTTP 200)                              | 200                           |
| Upatch loaded   | blocked (EPERM, HTTP 500)                       | 200                           |
| After unloading | reached (HTTP 200)                              | 200                           |

## 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-82960
```

Publish and roll out:

```sh
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>
```

## Review

- Contributors: romanlab.
- Reviewers: none recorded yet.

## Sources and links

- [CVE-2026-82960 record (CVE API)](https://cveawg.mitre.org/api/cve/CVE-2026-82960)
- [Apache OFBiz CVE announcement](https://lists.apache.org/thread.html/7b2syzksp7klt9fvhdg0olldvs2g83lz)
- [Apache OFBiz Downloads](https://ofbiz.apache.org/download.html)

### Links

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

### More references from NVD (1)

- [lists.apache.org](https://lists.apache.org/thread.html/7b2syzksp7klt9fvhdg0olldvs2g83lz) (Mailing List, Vendor Advisory)
