/

CVE-2026-94562

Severity:

HIGH RISK

(7.2)

Dynamic Callback (CWE-470) in NukeViet Users Module

CVE-2026-94562

Received

Vulnerability type

Category:

Unrestricted Dynamic Function Call

CWE:

CWE-94, CWE-470, CWE-749

Impact:

Operating-System Command Execution

Severity:

HIGH RISK

(7.2)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

NukeViet CMS allows a super-administrator to configure an existing PHP function as a custom profile-field callback without restricting the selection to approved functions. When the field is later validated, the stored callback is invoked; a dangerous selection could execute commands as the web-server account, and ordinary users may be able to trigger it through normal field validation.

Affected context

The issue occurs in NukeViet CMS custom profile-field handling when a super-administrator configures a callback through the user-fields administration interface. The callback name is checked for existence but is not limited to a safe set of functions, and the selected function is later invoked during registration or profile validation. Risk depends on administrative access to configure the field and on whether a hazardous callback is stored; ordinary users may then trigger it through affected validation flows. A malicious callback already stored in the database may remain after application code is updated and require separate cleanup.

Exploit preconditions

  • Attack surface: Custom profile-field configuration and validation in the Users module
  • Required access to configure: Super-administrator access satisfying the NV_IS_SPADMIN gate
  • Trigger point: Registration, profile editing, or administrator editing that validates the configured field
  • Required state: A hazardous existing PHP function has been saved as the field's callback
  • Why exploitation is possible: The callback is selected based on a function name that is checked for existence but not restricted by an allowlist, then invoked dynamically

Why this happens

The application accepts a function name as configuration and passes it to a dynamic invocation mechanism after checking only that the function exists. This is an instance of CWE-470: Use of Externally-Controlled Input to Select Classes or Code, and can also enable CWE-94: Improper Control of Generation of Code when the selected function performs command execution. The underlying insecure pattern is treating a configurable identifier as safe executable behavior without restricting it to intended callbacks.

Potential impact

  • A selected command-execution function could run operating-system commands as the web-server account.
  • The web application or its data may be compromised.
  • An ordinary user who can reach an affected validation flow may trigger a callback configured by an administrator.
  • A malicious callback stored before remediation could remain active until the database entry is reviewed and cleaned.

General mitigation guidance

Defensive approaches focus on limiting which behavior configuration can select and reducing the trust placed in stored callback names.

  • Use a strict allowlist of application-defined callbacks rather than accepting arbitrary existing function names.
  • Prefer explicit, non-executable validation rules or declarative field constraints over dynamic function invocation.
  • Validate callback settings when they are saved and again before use, with safe defaults for missing or invalid values.
  • Review and remove unexpected callback values from persistent configuration after applying code-level remediation.
  • Limit super-administrator access and run the web-server process with the least privileges necessary.

How teams detect issues like this

  • Search code for user- or administrator-configurable function names passed to function_exists() and then to dynamic invocation APIs such as call_user_func().
  • Review custom profile-field settings for callback values outside an approved set, including values persisted in the database.
  • Use static-analysis rules and code-review checks to flag dynamic function calls whose targets are derived from stored configuration.
  • Enforce policies that require callback registries or allowlists for configurable behavior, and monitor relevant settings for unexpected changes.

Sources

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

Frequently asked

questions

An ordinary user cannot configure the callback through the super-administrator-gated interface, but may be able to trigger an already stored callback by submitting a form that validates the affected field.

Configuration requires super-administrator access that satisfies the NV_IS_SPADMIN gate. The risk to other users arises after a hazardous callback has been stored.

Restrict callback selection to a small allowlist of intended application-defined functions, or replace dynamic callbacks with declarative validation rules.

Review persisted custom-field settings and remove any callback that is not explicitly approved. Code-level validation alone may not clean an unsafe value already present in the database.

Find out what's already
exploitable in your codebase.