NukeViet CMS Image Upload RCE (CVE-2026-94597) – patch to 4.5.12 / 4.6.02

NukeViet CMS before 4.5.12 and 4.6.02 allows a stored polyglot image with appended PHP short-tag code and a double-extension filename to execute as PHP on Apache mod_php systems with short_open_tag enabled, leading to OS command execution as the web-server user. Fixed in 4.5.12 and 4.6.02.

Overview

CVE-2026-94597 affects NukeViet CMS, a multi-purpose PHP CMS. In versions prior to 4.5.12 and 4.6.02, the image-upload flow is vulnerable to a polyglot file upload that can result in remote code execution under specific server configurations.

Key details

- Affected component: NukeViet\Files\Upload::save_file() and its reliance on verify_image(). - Root cause: verify_image() does not detect PHP <? short-open tags; filename validation only checks the final extension and preserves embedded dots; an .htaccess rule blocks PHP extensions only at the end of the URI. - Exploitation: An attacker who can reach an image-upload flow can upload a valid image with appended PHP short-tag code and a double-extension filename. On Apache mod_php systems with short_open_tag enabled and a PHP extension handler, the stored file can execute as PHP and run OS commands as the web-server user. - Non-exposed configurations: PHP-FPM, nginx, and end-anchored PHP handler configurations are not exposed to the execution step. - Fixed versions: 4.5.12 and 4.6.02.

What to do

1. Identify all NukeViet CMS installations and confirm the current version. Affected versions are prior to 4.5.12 and prior to 4.6.02. 2. Upgrade to NukeViet 4.5.12 or 4.6.02 (or a later fixed release) as soon as possible. Verify the vendor advisory and release notes before changing production systems. 3. If immediate patching is not possible, restrict access to image-upload flows and review Apache/.htaccess configuration to ensure PHP handlers are end-anchored and short_open_tag is disabled. Note that PHP-FPM and nginx configurations are not exposed to the execution step. 4. Audit existing uploaded images for polyglot files containing embedded PHP short tags and double-extension filenames; remove any suspicious files. 5. Review web-server and application logs for signs of exploitation, and rotate credentials if compromise is suspected.

References

- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-94597 - Commit: https://github.com/nukeviet/nukeviet/commit/5703071071ddb7400a0704da4c9bb4da6c6ddb23 - Release 4.6.02: https://github.com/nukeviet/nukeviet/releases/tag/4.6.02 - Security advisory: https://github.com/nukeviet/nukeviet/security/advisories/GHSA-2cvj-x8hg-6wcq - Vendor announcement: https://nukeviet.vn/vi/news/Tin-tuc/thong-bao-phat-hanh-nukeviet-4-6-02-858.html

Sources