High impactSecurityPatch available

NukeViet CVE-2026-94597: upload RCE hinges on Apache mod_php config

A four-step upload bypass in NukeViet becomes remote code execution only on Apache mod_php with short tags enabled, and conflicting registry data on the 4.6 fix may mislead scanners.

Khalid Aboubakr Engineering DeskPublished

Automated engineering analysis by the Khalid Aboubakr Engineering Desk, from the primary sources listed below. Not reviewed by a person before publication. About the desk

Bottom line

The CVE record, NVD and the project's own advisory say CVE-2026-94597 is fixed in NukeViet 4.5.12 and 4.6.02, but the GitHub Advisory Database and OSV entries list no patched version for the 4.6 branch. Code execution requires Apache mod_php with short_open_tag enabled; PHP-FPM and nginx sites are not exposed to that step. Upgrade every NukeViet install to 4.5.12 or 4.6.02 regardless of server stack, and treat scanner alerts on 4.6.02 as a likely registry data issue.

What happened

NukeViet CMS has a remote code execution flaw in its file-upload pipeline, tracked as CVE-2026-94597 and GHSA-2cvj-x8hg-6wcq. The NVD record lists a base score of 7.5; the CVE record and the GitHub advisory give the CVSS 3.1 vector as AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H.

The flaw chains four weaknesses in NukeViet\Files\Upload::save_file():

  1. verify_image() detected <?php and <?= but not the bare <? short tag.
  2. The filename sanitiser kept dots, so an embedded .php survived inside a name.
  3. Extension validation looked only at the final extension.
  4. The generated .htaccess rule blocked .php only when it ended the URI.

According to the advisory, an image with PHP appended can therefore pass validation and be stored with a double extension. Execution happens only on Apache mod_php with short_open_tag enabled and an extension-based PHP handler. Sites on PHP-FPM, nginx, or handler rules anchored to the end of the filename do not reach the execution stage.

The pipeline serves the admin uploader and user-facing endpoints: avatars, banners and, when enabled, comment attachments. If execution succeeds, the advisory describes commands running as the web-server user, leaked database credentials, arbitrary file access, and a foothold for reaching internal networks or the cloud metadata service.

The CVE record and NVD state the fix is in 4.5.12 and 4.6.02. The GitHub Advisory Database entry and OSV list 4.5.12 as patched for the 4.5 line but no patched version for >= 4.6.00.

Why it matters

The headline says RCE, but exposure is decided by the web-server stack, not by the NukeViet version alone. A vulnerable NukeViet behind PHP-FPM or nginx can store the malicious file but does not run it. The same version on Apache with mod_php, AddHandler-style handlers and short tags enabled is fully compromisable.

The CVSS vector says low privileges are enough, and the avatar and comment-attachment paths suggest an ordinary registered account may be all an attacker needs on sites with open registration. Teams still running Apache mod_php with AddHandler should treat this as high priority.

The advisory text is also misleading in one place: it says any 4.6.x site with that Apache setup is exposed, yet the affected ranges include the 4.5 branch below 4.5.12. Teams on 4.5 should not read themselves out of scope.

Engineering assessment

Our assessment: this is a serious issue for a narrow but real population, and a hygiene fix for everyone else.

  • Real exposure is configuration-gated. The AC:H rating is consistent with execution needing a specific Apache handler setup. Where that setup exists, impact is total: database credentials, file system and lateral movement. Where it does not, the residual risk is stored malicious files waiting for a future configuration change (a migration back to Apache, a copied vhost, an .htaccess edit).
  • The fix is the right shape. Upstream moved protection into the application: short-tag detection independent of short_open_tag, no dots in stored name parts, and an .htaccess rule that blocks dangerous extensions anywhere in the path, including phtml and phar. This removes the dependency on server configuration, which is why upgrading matters even on PHP-FPM.
  • The registry conflict is the operational trap. Because GHSA and OSV list no fix for >= 4.6.00, version-based scanners (Composer audit tooling, SCA platforms) may keep flagging 4.6.02. Teams may then either waste time chasing a false positive or, worse, conclude no fix exists and rely on workarounds indefinitely. The CVE record, NVD and the project's repository advisory all name 4.6.02 as patched, and that is the stronger signal. Document the exception rather than suppressing the CVE globally.
  • The upgrade does not clean up history. The evidence describes only upload-time and .htaccess changes. Files stored before the upgrade are not described as being re-validated, so a polyglot already in uploads/ would remain. On exposed Apache mod_php hosts, patching without reviewing stored uploads is incomplete.
  • Workarounds are second-best. The vendor itself calls them mitigations only. Turning off the PHP engine for uploads/ is a sound interim control; disabling short_open_tag blocks only this specific payload shape.

This reinforces a long-standing recommendation for PHP platforms: upload directories should never be executable, and handler rules should be anchored to the end of the filename. Teams building their own web platforms can use this chain as a checklist for their own upload code.

Is this you?

  • You run NukeViet below 4.5.12 on the 4.5 branch, or 4.6.00–4.6.01 on the 4.6 branch.
  • Your server uses Apache with mod_php (not PHP-FPM, not nginx).
  • short_open_tag is On in the configuration Apache's mod_php actually loads (the CLI value can differ).
  • PHP files are mapped with AddHandler rather than SetHandler inside a FilesMatch "\.php$" block.
  • Avatar, banner or comment-attachment uploads are enabled, or public registration is open.
  • Your scanner flags NukeViet 4.6.02 for this CVE: likely the GHSA/OSV metadata gap, not a missing patch.

All of the first four together means full RCE exposure. Only the first means you hold the vulnerable upload logic without the execution step.

What to do

  1. Inventory (today). Identify versions and stack on each host, for example composer show nukeviet/nukeviet, php -v and apachectl -M | grep -i php. php -i | grep short_open_tag reports the CLI configuration, which may differ from Apache's; confirm the value in the php.ini files that mod_php loads.
  2. Upgrade now. Move 4.5.x installs to 4.5.12 and 4.6.x installs to 4.6.02. Do this on PHP-FPM and nginx hosts too, since the validation defects exist there. If installing from the release archive, verify the checksums published on the 4.6.02 release page.
  3. If you cannot upgrade immediately (vendor mitigation). On Apache mod_php, disable the PHP engine for uploads/ (php_flag engine off) or remove the handler there with RemoveHandler; alternatively move to PHP-FPM or SetHandler inside a FilesMatch "\.php$" rule. Disabling short_open_tag also blocks this payload shape. The vendor is explicit that these are not a substitute for upgrading.
  4. Review stored uploads on exposed hosts. Not vendor guidance: list files whose names carry an embedded PHP-like extension, for example find uploads/ -type f \( -iname '*.php*.*' -o -iname '*.phtml*' -o -iname '*.phar*' \), and review any hits before and after patching. If anything suspicious appears on an Apache mod_php host, treat database credentials as exposed and rotate them.
  5. Test after upgrade. Confirm avatar, banner and attachment uploads still work and that newly stored filenames no longer contain inner dots. Check whether the upload-directory .htaccess reflects the new rule; the evidence does not say whether upgrading regenerates existing .htaccess files.
  6. Fix the scanner noise deliberately. Record a documented exception for 4.6.02 that cites the CVE record and NVD, and revisit it when GHSA/OSV metadata changes.
  7. Plan (technical leads). Not vendor guidance: retire mod_php with AddHandler across the PHP estate in favour of PHP-FPM with end-anchored handlers, and keep upload storage non-executable by design.

What we don't know yet

  • Whether GHSA and OSV will be corrected to list 4.6.02 as patched for the 4.6 branch. The desk will recheck the registry entries.
  • How the fix commit 570307107 relates to the 4.6.02 tag commit 9d0b9b5. OSV lists both as fix points, but no source explains the relationship, so 4.6.02 containing the full fix rests on the CVE record and the project advisory.
  • How to detect earlier abuse: the advisories publish no indicators of compromise or detection guidance.
  • Whether upgrading re-validates files already in uploads/ or regenerates existing .htaccess files; the evidence says nothing about either.
  • Attack activity: no KEV listing or vendor statement on exploitation appears in the evidence; CISA's SSVC entry in the CVE record (25 Nov 2026) marked exploitation as "none" at that time, which does not rule out later activity.
  • The support status of the 4.5 branch, which the evidence does not address.

Sources

Latest engineering analysis