high

CVE-2026-94597

Packagist · nukeviet/nukeviet

Summary

NukeViet CMS: Remote Code Execution via image-upload bypass chain (PHP short-tag detection bypass + double-extension filename)

Severity
high
CVSS
7.5
EPSS
0.8% (p57)
CWE
CWE-184, CWE-434
Also known as
GHSA-2cvj-x8hg-6wcq
Published
2026-11-30
Updated
2026-11-30

Advisory details

Impact

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:

  1. verify_image() scanned only for the <?php and <?= tags and missed the <? short-open tag (CWE-184).
  2. The filename sanitizer preserved dots, so shell.php.jpg kept its embedded .php.
  3. Extension validation inspected only the last extension.
  4. The generated .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:

Patches

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:

Users should upgrade to the patched release.

Workarounds

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.

References

Related advisories

Is your project exposed to this? Stateward checks every dependency on every pull request and flags it only if your code actually reaches it.

Check my repo

Summarize with AI

ChatGPTClaudePerplexity

Sources: CISA KEV (public domain), OSV.dev & GitHub Advisory Database (CC-BY-4.0), FIRST EPSS, NVD/CWE (public domain). Served live from the Stateward advisory database.