/

CVE-2026-94597

Severity:

HIGH RISK

(7.5)

Unrestricted File Upload (CWE-434) in NukeViet CMS

CVE-2026-94597

Received

Vulnerability type

Category:

Unrestricted File Upload

CWE:

CWE-184, CWE-434

Impact:

Remote Code Execution

Severity:

HIGH RISK

(7.5)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

NukeViet CMS could accept an image containing PHP short-tag code under a double-extension filename because image verification and extension checks did not account for this combination. In specific Apache mod_php configurations with short tags enabled, accessing the stored file could execute the embedded code as the web-server user.

Affected context

The issue affects NukeViet image-upload flows where uploaded files are stored with embedded dots in their names and validation checks only the final extension. Execution is conditional: the server must use Apache mod_php with short_open_tag enabled and a PHP handler that recognizes the relevant filename, while the .htaccess rule does not block the extension because it is not at the end of the URI. PHP-FPM, nginx, and end-anchored handler configurations are not exposed to the described execution path.

Exploit preconditions

  • Attack surface: A NukeViet image-upload flow that stores uploaded files.
  • Required access: Ability to reach and submit files through that upload flow.
  • Trigger point: The stored file must be requested in a way that invokes the server's PHP handler.
  • Why exploitation is possible: Image verification misses PHP short-open tags, filename validation checks only the final extension, and the .htaccess restriction does not block the embedded PHP extension in this filename pattern. Execution also depends on the specified Apache and PHP configuration.

Why this happens

This issue combines CWE-434: Unrestricted Upload of File with Dangerous Type with CWE-184: Incomplete List of Disallowed Inputs. The upload pipeline relies on image verification that does not detect the PHP short-open tag, preserves embedded dots in filenames, and validates only the final extension. As a result, validation and web-server handler rules can interpret the same stored file differently, allowing executable content to remain accessible under configurations that recognize the embedded PHP extension.

Potential impact

  • An attacker may execute operating-system commands as the web-server user when the required server configuration is present.
  • The attacker could compromise the CMS runtime or access data available to that process.
  • The attacker may alter hosted content or use the compromised service to affect connected systems, depending on permissions and network access.

General mitigation guidance

Defensive patterns include treating all uploaded content as untrusted, regardless of its claimed type or extension.

  • Decode and re-encode images using a trusted image-processing library, or accept only narrowly defined image formats.
  • Generate server-controlled filenames without user-supplied extensions or embedded dots, and use an allowlist for permitted types.
  • Store uploads outside the web root or serve them through a mechanism that cannot execute uploaded content.
  • Configure handlers and access rules to deny script execution for uploaded content, using rules that match the complete path and filename.
  • Apply least privilege to the web-server process and restrict its access to files and system resources.

How teams detect issues like this

  • Use static analysis and code review to identify upload paths where verification, filename normalization, and extension checks are inconsistent.
  • Review image-verification logic for coverage of alternate script tags and polyglot files.
  • Inspect web-server handler mappings and access rules for extension matching that is not anchored to the complete filename.
  • Use policy checks to require generated filenames, approved content types, and non-executable upload storage.
  • Monitor upload and web-server logs for unusual double-extension filenames and requests to uploaded content that produce script execution.

Sources

SourceLink
github.comgithub.com/nukeviet/nukeviet/commit/5703071071ddb7400a0704da4c9bb4da6c6ddb23
github.comgithub.com/nukeviet/nukeviet/releases/tag/4.6.02
github.comgithub.com/nukeviet/nukeviet/security/advisories/GHSA-2cvj-x8hg-6wcq
nukeviet.vnnukeviet.vn/vi/news/Tin-tuc/thong-bao-phat-hanh-nukeviet-4-6-02-858.html

Frequently asked

questions

No. The described execution path requires a reachable image-upload flow and a specific Apache mod_php configuration with short tags enabled and a handler that recognizes the embedded PHP extension.

An attacker needs the ability to submit a file through an affected upload flow. Whether that flow is available to unauthenticated users depends on the site's configuration and access controls.

Treat uploads as untrusted: validate and transform content, assign server-controlled filenames, and store files where the web server cannot execute them.

Align content verification, filename handling, and server-handler rules; enforce a narrow allowlist; and test upload policies against polyglot files and alternate filename forms.

Find out what's already
exploitable in your codebase.