This is a Remote Code Execution (RCE) vulnerability (CWE-434) reachable through NukeViet's file-upload pipeline (NukeViet\Files\Upload::save_file()).
The pipeline is used by the admin uploader and by user-facing endpoints: avatar, banner, and comment attachments (when enabled).
An attacker uploads a valid image (for example a GIF) with PHP code appended after the image data - a polyglot - and passes every upload check by chaining four weaknesses:
verify_image() scanned only for the <?php and <?= tags and missed the <? short-open tag (CWE-184).shell.php.jpg kept its embedded .php..htaccess rule blocked .php only at the end of the URI, so shell.php.jpg was not blocked (CWE-184).On servers configured with short_open_tag = On and Apache mod_php using AddHandler application/x-httpd-php .php, the uploaded file is executed as PHP.
This yields arbitrary OS command execution as the web-server user (for example www-data): full site compromise, disclosure of database credentials, arbitrary file read/write, and pivoting into the internal network or the cloud metadata service.
Who is impacted:
SetHandler / FilesMatch \.php$, nginx, or OpenLiteSpeed are not exposed to the execution step, but the upload-validation defects still apply as defense-in-depth issues.Yes. The issue is fixed in the next release (commit 570307107).
The fix hardens the upload pipeline at the application layer, so protection no longer depends on the web-server configuration:
verify_image() now also detects the <? short-open tag. It normalizes the matched snippet to <?php before tokenizing, so detection is independent of the scanning server's short_open_tag setting and the polyglot is rejected at upload time..php..htaccess rewrite rule now blocks the dangerous extensions anywhere in the path (double-extension included) and also covers php[0-9]?, phtml, and phar.Users should upgrade to the patched release.
These are mitigations only - the robust fix is to upgrade, because the underlying weakness is in the upload-validation and filename logic, not in the web-server configuration.
mod_php, set php_flag engine off (or remove the handler with RemoveHandler) for the uploads/ directory.SetHandler with a <FilesMatch "\.php$"> rule, so that only files ending in .php are ever handed to the interpreter.short_open_tag also prevents the specific short-tag payload.{
"cwe_ids": [
"CWE-184",
"CWE-434"
],
"github_reviewed": true,
"github_reviewed_at": "2026-11-30T21:05:01Z",
"nvd_published_at": "2026-11-20T19:18:56Z",
"severity": "HIGH"
}