CVE-2026-94597 in NukeViet
Summary
by MITRE • 11/20/2026
NukeViet CMS is a multi Content Management System. Prior to 4.5.12 and 4.6.02, 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. NukeViet\Files\Upload::save_file() relied on verify_image(), which missed the <? short-open tag, while filename handling preserved embedded dots, validation inspected only the final extension, and an .htaccess rule blocked PHP extensions only at the end of the URI. On Apache mod_php systems configured with short_open_tag and a PHP extension handler, the stored polyglot can execute as PHP and run operating-system commands as the web-server user; PHP-FPM, nginx, and end-anchored handler configurations are not exposed to the execution step. This issue is fixed in versions 4.5.12 and 4.6.02.
Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.
Analysis
by VulDB Data Team • 11/20/2026
The vulnerability identified in NukeViet CMS prior to versions 4.5.12 and 4.6.02 represents a critical server-side code injection flaw rooted in inadequate input validation and flawed file handling logic within the image upload functionality. This security defect allows an authenticated attacker, or any user with access to the image-upload interface, to bypass standard security controls by uploading a maliciously crafted polyglot file. The attack vector relies on constructing a filename that contains embedded dots alongside a valid image extension at the end of the string, such as example.jpg.php or similar variations depending on server configuration. By appending PHP short-open tags directly into the binary data of what appears to be a legitimate image file, the attacker creates a payload that can trick both the application logic and the underlying web server into treating it as executable code rather than static media content.
The technical root cause lies in the specific implementation details of the NukeViet\Files\Upload::save_file() method and its dependency on the verify_image function. The verification process failed to inspect the file contents for dangerous PHP short-open tags, focusing instead on superficial characteristics that could be easily spoofed. Furthermore, the filename handling logic preserved embedded dots within the uploaded name rather than sanitizing or rejecting them based on strict extension policies. While validation routines checked only the final extension of the filename against a whitelist of allowed image types, this approach ignored the potential for double extensions to confuse downstream processing components. This oversight created a gap where files with valid-looking endings but malicious internal structures could pass initial checks and be persisted to the server's file system without triggering appropriate alarms or rejections.
The operational impact of this vulnerability is severe, particularly in environments running Apache mod_php with short_open_tag enabled and configured PHP extension handlers. In such configurations, when a user requests the uploaded polyglot file via its URI, the web server interprets the embedded dots correctly enough to pass it through the PHP handler due to the presence of the .php suffix or similar trigger at the end of the path, while the short-open tag within the image data initiates execution. This results in arbitrary code execution with the privileges of the web-server user, potentially leading full compromise of the underlying operating system and all hosted applications on that server. The severity is mitigated by specific server configurations; for instance, systems using PHP-FPM, nginx, or those employing end-anchored handler configurations do not expose this specific execution path because they strictly enforce extension-based routing without allowing embedded dots to alter processing behavior in the same manner as mod_php.
This vulnerability aligns with CWE-434 Unrestricted Upload of File with Dangerous Type and CWE-79 Improper Neutralization of Input Within Web Pages, reflecting a failure to properly validate file types and sanitize inputs before storage. From an offensive security perspective, it maps to MITRE ATT&CK technique T1505.003 Server Side Request Forgery via Cloud Services or more accurately T1505.002 Stored Web Shell, as the attacker establishes a persistent foothold on the server through a disguised file that executes upon access. The exploitation requires no complex network-level bypasses but relies entirely on social engineering or existing authentication to trigger the upload flow, making it a high-risk issue for any deployment where image uploads are permitted without rigorous content inspection and strict filename sanitization.
To mitigate this vulnerability, organizations must upgrade immediately to NukeViet CMS versions 4.5.12 or 4.6.02, which address these flaws by implementing stricter validation rules that reject files containing embedded dots in the filename and perform deep packet analysis on uploaded images to detect malicious code structures like short-open tags regardless of their position within the file data. Additionally, server administrators should review their web server configurations to ensure that PHP handlers are configured with end-anchored extensions or disabled entirely for directories intended only for static content. Implementing a Content Security Policy and utilizing dedicated file upload libraries that enforce strict MIME type verification against actual file signatures rather than just extension names can further reduce the risk of similar attacks in other applications.