{"id":"CVE-2026-94562","aliases":["CVE-2026-94562","GHSA-hjxg-4v29-j33c"],"related":[],"kind":"vulnerability","state":"published","title":"NukeViet CMS: Remote Code Execution via unrestricted custom field validation callback in the `users` module","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Impact\n\n_What kind of vulnerability is it? Who is impacted?_\n\nThe `users` module lets an administrator define custom profile fields. When a field uses the `callback` validation type, the supplied function name (`func_callback`) was accepted after only a `function_exists()` check — with **no allow-list and no restriction on which functions may be used**.\n\nAs a result, a function such as `system`, `exec`, `shell_exec` or `passthru` could be stored as the field's validator. The value is later passed to `call_user_func($func_callback, $value)` in `modules/users/fields.check.php` when the field is submitted (e.g. via `editinfo`, `register`, or admin edit), causing **arbitrary command execution on the server** under the web-server account (e.g. `www-data`).\n\n**Type:** Unsafe reflection / code injection leading to OS command execution (RCE).\n\n**Who is impacted / preconditions:**\n\n- Creating a malicious callback field requires the **users module field-management privilege, which is gated behind super-administrator access (`NV_IS_SPADMIN`)** — it is *not* reachable by a low-privilege admin or a normal user.\n- Once such a field exists, the callback runs whenever the field is validated (including by unprivileged users), but the trust boundary that is crossed is **super-admin → OS command execution as the web user**, not root and not an anonymous-to-admin escalation.\n\nBecause exploitation requires an already highly-trusted super-administrator and execution is confined to the unprivileged web account, the real-world severity is **Medium**, not critical.\n\n- **CVSS 3.1:** `AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H` = **7.2 (High)**\n\n### Patches\n\n_Has the problem been patched? What versions should users upgrade to?_\n\nYes. Validation of `func_callback` is now enforced against an explicit allow-list at write time. A callback function is only stored when it both exists **and** is declared in a new site configuration whitelist:\n\n```php\n// config.php\n$global_config['user_field_callbacks'] = ['your_validator_1', 'your_validator_2'];\n```\n\nIf the supplied function is not on the list, the callback is discarded and the field falls back to no validation, so a dangerous function such as `system` can no longer be attached to a field through the admin form. The admin field form also shows an on-screen note explaining that a callback must first be declared in `config.php`.\n\nUsers should upgrade to the patched release of NukeViet 4.6 that includes this change (or apply the corresponding commit).\n\n### Workarounds\n\n_Is there a way for users to fix or remediate the vulnerability without upgrading?_\n\n- **Restrict super-administrator accounts.** Only site super-admins can create/modify custom fields; limiting and monitoring these accounts removes the attack surface.\n- **Audit existing data.** Inspect the module field table (e.g. `nv4_users_field` and the `*_field` table of any module using this feature) for rows where `match_type = 'callback'`, and remove or correct any `func_callback` that is not a legitimate boolean-returning validator (e.g. `system`, `exec`, `shell_exec`, `passthru`, `assert`, `call_user_func`, etc.). This matters even after upgrading, because the fix validates at write time; a malicious value already present in the database must be cleaned manually.\n- **Harden the runtime.** Disable dangerous PHP functions via `disable_functions` in `php.ini` (e.g. `system,exec,shell_exec,passthru,proc_open,popen`) so that even an attacker-supplied callback cannot spawn OS commands.\n\n### Related\n\n_Are there any links users can visit to find out more?_\n\n- Sink: `modules/users/fields.check.php` — `call_user_func($row_f['func_callback'], $value)`\n- Source / fix location: `modules/users/admin/fields.php` — `func_callback` handling on field save\n- Configuration whitelist: `config.php` — `$global_config['user_field_callbacks']`","format":"markdown","source":"ghsa"}],"published":"2026-11-20T18:39:59.041Z","modified":"2026-11-30T20:45:09.939Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H","score":7.2,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H","score":7.2,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H","score":7.2,"rating":"HIGH"}],"cwes":["CWE-94","CWE-470","CWE-749"],"affected":[{"ranges":[{"version":"< 4.6.01","status":"affected"}],"vendor":"nukeviet","product":"nukeviet","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"4.6.01"}],"ecosystem":"Packagist","package":"nukeviet/nukeviet","purl":"pkg:composer/nukeviet/nukeviet","source":"ghsa"}],"references":[{"url":"https://github.com/nukeviet/nukeviet/security/advisories/GHSA-hjxg-4v29-j33c","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/nukeviet/nukeviet/commit/1aa773c7feb41ffe95b53501df5a6956002ca61b","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/nukeviet/nukeviet/releases/tag/4.6.01","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nukeviet.vn/vi/news/Tin-tuc/thong-bao-phat-hanh-nukeviet-4-6-01-857.html","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-94562","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/nukeviet/nukeviet","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-11-20T20:40:37.318Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-94562","url":"https://www.cve.org/CVERecord?id=CVE-2026-94562","licence":"CVE Terms of Use","modified":"2026-11-20T20:40:43.771Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-hjxg-4v29-j33c","url":"https://github.com/advisories/GHSA-hjxg-4v29-j33c","licence":"CC-BY-4.0","modified":"2026-11-30T20:45:09.939Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-94562","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-94562","licence":"Public domain","modified":"2026-11-20T21:17:39.530Z"}],"updatedAt":"2026-11-30T20:57:24.918Z","epss":{"score":0.01041,"percentile":0.6496,"date":"2026-12-01T12:00:22.000Z"}}