# CVE-2026-94562: NukeViet CMS: Remote Code Execution via unrestricted custom field validation callback in the `users` module

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

## At a glance

CVE-2026-94562 is rated High 7.2 (CVSS 3.1, CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H). It affects NukeViet (nukeviet) and was published on 20 Nov 2026. It is not in CISA's Known Exploited Vulnerabilities catalog. Its EPSS score is 1.0%: the estimated chance it is exploited in the next 30 days, as of 24 Nov 2026. The upatch `cve-2026-94562-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-94562 affects NukeViet CMS prior to 4.6.01. In `modules/users/admin/fields.php`, a super-administrator satisfying `NV_IS_SPADMIN` can configure the `func_callback` setting of a custom user profile field (`match_type` set to `callback`) to any existing PHP function name because the handler only checks `function_exists($dataform['func_callback'])` without restricting callbacks to an allowlist. When a user registers or edits their profile, or an administrator edits user data, `modules/users/fields.check.php` validates the custom field by calling `call_user_func($row_f['func_callback'], $value)`. Setting `func_callback` to a command-execution function such as `system`, `exec`, or `passthru` executes operating-system commands as the web-server user when the field is validated. NukeViet 4.6.01 fixes the issue in commit `1aa773c7feb41ffe95b53501df5a6956002ca61b` by requiring `func_callback` to be listed in `$global_config['user_field_callbacks']` in `config.php`.

### Official description

NukeViet CMS is a multi Content Management System. Prior to 4.6.01, a super-administrator satisfying the NV_IS_SPADMIN gate can use modules/users/admin/fields.php to store an arbitrary existing PHP function in the func_callback setting for a custom profile field because the callback name is checked only with function_exists() and no allowlist restricts which function may be selected. modules/users/fields.check.php later invokes that function through call_user_func() when the field is validated through registration, profile editing, or administrator editing. Selecting a command-execution function crosses the super-administrator to operating-system boundary and executes commands as the web-server account, while ordinary users can trigger the stored callback after it is configured. Because the remediation validates callbacks only when they are written, upgrading does not remove a malicious callback already stored in the database, which must be cleaned manually. This issue is fixed in version 4.6.01.

## What the upatch does

`cve-2026-94562-exec-block` attaches to `lsm/bprm_check_security` and returns `-EPERM` when either the current task or its parent task (`real_parent`) has an executable whose name begins with `php` and a current working directory (within 5 directory levels) whose name contains `nukeviet`. PHP functions such as `system()`, `exec()`, and `passthru()` fork a child process while still running the `php` binary and invoke `execve()` for `/bin/sh -c ...`; matching both `current` and `real_parent` stops both direct `execve()` from the forked PHP child and any sub-command it attempts to spawn. Refusals are counted in the `refused` per-CPU array map.

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

## Side effects

- PHP processes serving a NukeViet installation in a directory named `nukeviet` cannot spawn external operating-system commands (`execve` fails with `EPERM`).
- Normal NukeViet web requests, database queries, user registration, and built-in PHP validation callbacks continue to work because they run in-process without executing external binaries.
- Not covered: PHP callbacks that do not spawn a child process, or NukeViet installations whose directory path does not contain `nukeviet`.

## Preemption model and cost

The program is written for preemptible RCU (`PREEMPT_LAZY`, `PREEMPT_DYNAMIC`, and `PREEMPT_RT`). It holds no locks and updates only a per-CPU counter with `__sync_fetch_and_add` on refusal. `lsm/bprm_check_security` runs only on `execve`, where checking the current and parent `exe_file` dentry prefix (`php`) takes a few pointer reads and returns immediately for all non-PHP processes.

## Affected versions

The upatch targets NukeViet CMS versions prior to 4.6.01 (fixed in 4.6.01) on any Linux kernel with BPF LSM and BTF enabled, including Linux 7.4.

## How it was tested

On NukeViet 4.6.00 with a custom profile field callback set to system, the upatch blocked command execution during registration field validation while normal NukeViet requests continued to work.

- **Tested:** 25 Nov 2026
- **Target:** NukeViet 4.6.00 on PHP and MariaDB, custom user field in nv4_users_field with match_type=callback and func_callback=system, loopback only
- **Kernel:** 7.4-shirudo-ci-20261123
- **Architecture:** x86_64
- **Distribution:** Ubuntu 26.04

### Results

| State           | Callback command execution blocked |
| --------------- | ---------------------------------- |
| Before loading  | no                                 |
| Upatch loaded   | yes                                |
| After unloading | no                                 |

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

Publish and roll out:

```sh
shirudo bpm push build/packages/cve-2026-94562-1.0.0.bee oci://<registry>/<namespace>/cve-2026-94562 --keys-dir <keys-dir>
shirudo bpm tree append build/packages/cve-2026-94562-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

- <https://github.com/nukeviet/nukeviet/security/advisories/GHSA-hjxg-4v29-j33c>
- <https://github.com/nukeviet/nukeviet/commit/1aa773c7feb41ffe95b53501df5a6956002ca61b>
- <https://github.com/nukeviet/nukeviet/releases/tag/4.6.01>
- <https://github.com/nukeviet/nukeviet/releases/tag/4.6.00>
- <https://nukeviet.vn/vi/news/Tin-tuc/thong-bao-phat-hanh-nukeviet-4-6-01-857.html>

### Links

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

### More references from NVD (4)

- [github.com](https://github.com/nukeviet/nukeviet/commit/1aa773c7feb41ffe95b53501df5a6956002ca61b)
- [github.com](https://github.com/nukeviet/nukeviet/releases/tag/4.6.01)
- [github.com](https://github.com/nukeviet/nukeviet/security/advisories/GHSA-hjxg-4v29-j33c)
- [nukeviet.vn](https://nukeviet.vn/vi/news/Tin-tuc/thong-bao-phat-hanh-nukeviet-4-6-01-857.html)
