Alta

NukeViet: Path Traversal to Arbitrary File Deletion in Edit Comment Function

  • Publicada: 13.07.2026
  • Actualizado: 11.10.2026 10:22

Summary

Path Traversal to Arbitrary File Deletion in the Edit Comment admin function. An authenticated administrator can delete arbitrary files within the application root (e.g., config.php) by injecting a crafted attach parameter, rendering the application inoperable.

Affected Component

modules/comment/admin/edit.php

Root Cause

In the vulnerable version, the attach parameter received via HTTP POST was not validated before being processed:

php
// Vulnerable code (before fix)
$attach = $nv_Request->get_string('attach', 'post', '', true);
if (!empty($attach)) {
    $attach = substr($attach, strlen(NV_BASE_SITEURL . NV_UPLOADS_DIR . '/' . $module_upload . '/'));
}

substr() strips the first N characters (equal to the length of the upload URL prefix, e.g. 26 chars for /nukeviet/uploads/comment/). By padding the payload with exactly 26 arbitrary characters followed by a path traversal sequence, an attacker can store ../../<target> directly into the database.

When the comment is subsequently deleted, del.php reads attach from the database and calls:

php
nv_deletefile(NV_UPLOADS_REAL_DIR . '/' . $module_upload . '/' . $row['attach']);

nv_deletefile() resolves the path via realpath() and only verifies the result is within NV_ROOTDIR — it does not restrict deletion to the uploads directory — allowing deletion of any file in the installation root.

Steps to Reproduce

  1. Log in as an administrator and navigate to Admin → Comment Management.
  2. Select any comment and open the Edit form.
  3. Intercept the POST request and set the attach parameter to:
aaaaaaaaaaaaaaaaaaaaaaaaaa../../config.php

(26 padding characters + traversal path)

  1. Submit the request. The value ../../config.php is now stored in the database.
  2. Delete the comment. config.php is deleted from the application root.
  3. The application immediately redirects to the install wizard, confirming the file has been removed.

Impact

  • Any file readable by the web server process within NV_ROOTDIR can be permanently deleted.
  • Deleting config.php causes a full application outage and exposes the install wizard.

Severity

CVSS v3.1 Base Score: 8.7 (High)

CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:N/I:H/A:H
Metric Value
Attack Vector Network
Attack Complexity Low
Privileges Required High (Admin required)
User Interaction None
Scope Changed
Confidentiality None
Integrity High
Availability High

Fix

Added nv_is_file() validation before processing the attach value. This function uses realpath() and a regex check to ensure the file resolves to a path within the intended upload directory, rejecting any traversal attempts.

php
// Fixed code
$attach = $nv_Request->get_string('attach', 'post', '');
if (!empty($attach) and nv_is_file($attach, NV_UPLOADS_DIR . '/' . $module_upload)) {
    $attach = substr($attach, strlen(NV_BASE_SITEURL . NV_UPLOADS_DIR . '/' . $module_upload . '/'));
} else {
    $attach = '';
}

Software afectado

Haz clic en una tecnología para ver todas sus vulnerabilidades.

PlataformaPaqueteVersiones vulnerablesCorregida en
Paquete de Composer nukeviet/nukeviet < 4.6.00 4.6.00

Referencias

Puntuación CVSS 8.7/10
Vector CVSS
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:N/I:H/A:H
Debilidad (CWE)
CWE-22
Plataforma
Composer
Paquete
nukeviet/nukeviet
Publicada
13.07.2026
Actualizado
11.10.2026 10:22

Fuentes y licencias

OSV / GitHub Advisory Database - GHSA-c9xg-64p9-f2jj - CC BY 4.0

Historial de vulnerabilidades: nukeviet/nukeviet

Todas las vulnerabilidades publicadas de este paquete (Paquete de Composer), de la más reciente a la más antigua. Muestra si es un fallo aislado o un paquete que hay que vigilar.

Todas (17) en el archivo
Entradas en total
17
Primera → última
06.2021 07.2026
Sin corrección
5
Explotada en ataques
0

Distribución por gravedad

  • Crítica 4
  • Alta 8
  • Media 5

Divulgaciones por año

  1. 2021: 2
  2. 2022: 8
  3. 2023: 0
  4. 2024: 1
  5. 2025: 0
  6. 2026: 6
Gravedad:
  1. Alta · 7.2 CVE-2026-55372 < 4.6.00 4.6.00
  2. NukeViet: Path Traversal to Arbitrary File Deletion in Edit Comment Function esta entrada
    Alta · 8.7 CVE-2026-54065 < 4.6.00 4.6.00
  3. Alta · 8.2 CVE-2026-48118 < 4.6.00 4.6.00
  4. Alta · 8.8 CVE-2024-36528 <= 4.5 sin corrección
  5. Crítica · 9.8 CVE-2020-21809 >= 4.0, < 4.0.29, >= 4.1, < 4.1.02, >= 4.2, < 4.2.01, = 4.3 4.0.29, 4.1.02, 4.2.01
  6. Crítica · 9.8 CVE-2020-21808 >= 4.0.10, < 4.3.08 4.3.08
  7. Alta · 8.8 CVE-2020-13155 = 4.4.0 sin corrección
  8. Crítica · 9.8 CVE-2019-7725 < 4.3.04 4.3.04
  9. Crítica · 9.8 CVE-2019-7726 < 4.3.04 4.3.04

Identifica las vulnerabilidades de tu aplicación

Con la integración de DockRay y el inventario de software activado, DockRay compara las versiones notificadas de los componentes con las vulnerabilidades conocidas y avisa de las coincidencias confirmadas. La cobertura depende de la tecnología compatible y de los avisos disponibles.

Conectar tu aplicación
Newsletter DockRay

La seguridad de tus aplicaciones en tu correo

Vulnerabilidades importantes, recomendaciones concretas y consejos prácticos para tus aplicaciones. Elige tus tecnologías y sigue lo que importa para tu proyecto.

  • Un resumen diario de nuevas vulnerabilidades, también las críticas.
  • Avisos sobre actualizaciones importantes.
  • Consejos prácticos sobre seguridad y monitorización de aplicaciones.

Déjalo vacío para recibir avisos de todas las tecnologías.

Suscripción gratuita. Date de baja con un clic en cualquier correo.