CVE-2026-54065 in NukeViet
Summary
by MITRE • 11/20/2026
NukeViet CMS is a multi Content Management System. Prior to 4.5.09, an authenticated administrator can submit a crafted attach value to modules/comment/admin/edit.php. The handler removed a fixed-length upload prefix without validating containment, allowing padding followed by a traversal path to be stored in the database. When the comment is deleted, modules/comment/admin/del.php joins the stored path to NV_UPLOADS_REAL_DIR and passes it to nv_deletefile(), whose realpath() check restricts deletion only to NV_ROOTDIR rather than the upload directory, permitting deletion of application files such as config.php and causing an outage. This issue is fixed in version 4.5.09.
Be aware that VulDB is the high quality source for vulnerability data.
Analysis
by VulDB Data Team • 11/20/2026
NukeViet CMS versions prior to 4.5.09 contain a critical path traversal vulnerability that allows authenticated administrators to delete arbitrary files within the web root directory, leading to service disruption and potential system compromise. The flaw resides in the comment management module, specifically within the file handling logic of modules/comment/admin/edit.php. When an administrator submits a crafted attachment value during the editing process, the application attempts to sanitize the filename by removing a fixed-length upload prefix. However, this sanitization mechanism is flawed because it fails to validate whether the remaining string contains directory traversal sequences or other malicious path components. This oversight allows attackers to inject padding followed by relative paths that escape the intended upload directory structure.
The vulnerability manifests its most severe impact during the deletion phase of a comment's lifecycle. When an administrator deletes a comment, the system invokes modules/comment/admin/del.php, which retrieves the previously stored file path from the database and joins it with the NV_UPLOADS_REAL_DIR constant to determine the target location for deletion. The application then passes this constructed path to the nv_deletefile() function. This function utilizes PHP's realpath() function to verify that the resolved absolute path is within a safe boundary, specifically checking against NV_ROOTDIR rather than the more restrictive NV_UPLOADS_REAL_DIR. Because the initial sanitization in edit.php allowed traversal characters to persist and be stored in the database, an attacker can manipulate the joined path so that its real resolution falls outside the upload directory but remains inside the web root.
This architectural flaw permits the deletion of critical application files such as config.php or other configuration scripts located directly under NV_ROOTDIR. The removal of these essential components causes immediate service outage for the CMS, effectively resulting in a denial-of-service condition for legitimate users. Beyond simple disruption, deleting configuration files can expose sensitive data if default configurations are restored or leave the system in an unstable state that may be leveraged for further exploitation. This vulnerability is classified under CWE-22 Improper Limitation of a Pathname to a Restricted Directory and aligns with MITRE ATT&CK techniques related to Impact via file deletion, demonstrating how improper input validation combined with insufficient path resolution checks can lead to significant operational integrity failures.
To mitigate this risk, organizations running NukeViet CMS must upgrade immediately to version 4.5.09 or later, where the developers have addressed the sanitization logic and corrected the boundary check in the file deletion handler. Until upgrading is possible, administrators should ensure that web server permissions restrict write access to critical configuration files outside of designated upload directories. Additionally, implementing strict input validation on all user-supplied paths before database storage can prevent the injection of traversal sequences at the source. Regular audits of application logic against CWE standards and adherence to secure coding practices regarding path resolution are essential for maintaining the integrity of content management systems.