All vulnerabilities

Packagist

CVE-2026-94597

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

Severity
High 7.5
Published
30 Nov 2026
Last changed
30 Nov 2026
Added to UpHeron
30 Nov 2026
Fixed in
4.5.12
Exploit chance
0.8% in the next 30 daysHigher than 52% of CVEs. EPSS by FIRST, 30 Nov 2026
Weakness
Incomplete deny list (CWE-184)Unrestricted file upload (CWE-434)
Attack
Over the network · Only under certain conditions · Needs a user account · No user action needed
Attacker can
Read data · Change data · Take it down
CVSS vector
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
Also known as
GHSA-2cvj-x8hg-6wcq
Sources
OSV.dev and GitHub

Description

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).
  • The filename sanitizer preserved dots, so shell.php.jpg kept its embedded .php.
  • Extension validation inspected only the last extension.
  • 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.

From the GitHub Advisory Database, CC BY 4.0. Shortened; the full text is there.

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.

  • On Apache with mod_php, set php_flag engine off (or remove the handler with RemoveHandler) for the uploads/ directory.
  • Or migrate to PHP-FPM / SetHandler with a rule, so that only files ending in .php` are ever handed to the interpreter.
  • Disabling short_open_tag also prevents the specific short-tag payload.
Workarounds as given by the GitHub Advisory Database, CC BY 4.0.

Affected software

SoftwareAffected versions
nukeviet/nukevietPackagist · osv:Packagist:nukeviet/nukeviet
  • Every version before 4.5.12
  • From 4.6.00 on

About nukeviet/nukeviet

Monthly downloads (Packagist)
9Packagist, 30 Nov 2026
Total downloads (Packagist)
45Packagist, 30 Nov 2026

References