Kestrel
대시보드로 돌아가기
CVE-2026-54065HIGH· 8.7GHSA대응게시일: 2026. 07. 13.수정일: 2026. 07. 13.

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

위협 신호 · CVSS · EPSS · KEV

정기 패치· 높은 악용 신호 없음
CVSS
8.7high

이론적 심각도 점수

EPSS

예측 데이터 없음

KEV
미등재

실측 악용 기록 없음

권장 대응 기한60일 이내CISA SSVC 기준

계획된 패치 주기 내 조치(60일 이내)

외부 노출· KEV 미등재 · 자동화 어려움 · 부분 영향 · 외부 노출

CVSS 벡터 · 메트릭

악용 경로
공격 벡터네트워크
공격 복잡도낮음
필요 권한높음
사용자 상호작용불필요
범위변경
영향
기밀성 영향없음
무결성 영향높음
가용성 영향높음
버전별 점수
CVSS 3.18.7HIGH
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:N/I:H/A:H

상세 설명

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:

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

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:

bash
1nv_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:
text
1aaaaaaaaaaaaaaaaaaaaaaaaaa../../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)

text
1CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:N/I:H/A:H
MetricValue
Attack VectorNetwork
Attack ComplexityLow
Privileges RequiredHigh (Admin required)
User InteractionNone
ScopeChanged
ConfidentialityNone
IntegrityHigh
AvailabilityHigh

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.

bash
1// Fixed code
2$attach = $nv_Request->get_string('attach', 'post', '');
3if (!empty($attach) and nv_is_file($attach, NV_UPLOADS_DIR . '/' . $module_upload)) {
4 $attach = substr($attach, strlen(NV_BASE_SITEURL . NV_UPLOADS_DIR . '/' . $module_upload . '/'));
5} else {
6 $attach = '';
7}

AI 심층 분석

공격 시나리오 · 재현 가능한 PoC 페이로드 · 즉시 적용 가능한 차단 패치를 한 번에 받아 보세요. 보안 운영팀이 그대로 점검·티켓팅에 쓸 수 있는 형태로 정리해 드립니다.