CVE-2026-94599
JSON

6.1medium

NukeViet CMS: Reflected XSS in news module search via double URL decoding of the q parameter

Severity
6.1medium CVSS:3.1 by GitHub_M
Exploit likelihood
0.55% (higher than 40% of CVEs)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-3q6c-wfxw-7hj6

Description

NukeViet CMS is a multi Content Management System. From 4.5.00 until 4.5.13 and 4.6.02, an unauthenticated attacker can place a multiply encoded value in the news module search q parameter. $nv_Request->get_title() decodes and sanitizes the input once, but modules/news/funcs/search.php subsequently applies urldecode() after sanitization. The resulting raw keyword reaches the {KEY} search-input attribute through search_theme() and the no-results element through search_result_theme() in the default and mobile themes, permitting attribute or tag injection and same-origin JavaScript execution when a victim opens the crafted search URL. This issue is fixed in versions 4.5.13 and 4.6.02.

Affected

Product or packageVersionsReported by
nukeviet nukeviet>= 4.5.00, < 4.5.13, >= 4.6.00, < 4.6.02CVE List
nukeviet/nukeviet (Packagist)from 4.5.00 before 4.5.13, from 4.6.00GitHub Advisory Database

All scores

GitHub_M6.1medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
GitHub6.1medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Classification

CWE-79CWE-174

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

NukeViet CMS is a multi Content Management System. From 4.5.00 until 4.5.13 and 4.6.02, an unauthenticated attacker can place a multiply encoded value in the news module search q parameter. $nv_Request->get_title() decodes and sanitizes the input once, but modules/news/funcs/search.php subsequently applies urldecode() after sanitization. The resulting raw keyword reaches the {KEY} search-input attribute through search_theme() and the no-results element through search_result_theme() in the default and mobile themes, permitting attribute or tag injection and same-origin JavaScript execution when a victim opens the crafted search URL. This issue is fixed in versions 4.5.13 and 4.6.02.

GitHub Advisory Database
Impact

This is a reflected Cross-Site Scripting (XSS) vulnerability in the search function of the news module. It is caused by the search keyword being URL-decoded after it has already been sanitized (CWE-174: Double Decoding of the Same Data).

The q parameter is read with $nv_Request->get_title(), which neutralizes ', ", < and >. During that filtering, %XX sequences are resolved once more, so a value such as %2522 becomes the literal text %22 and passes the filter untouched. modules/news/funcs/search.php then called urldecode() on the filtered value, turning %22 into a real " after all sanitization had run. The resulting raw keyword was passed to search_theme() and search_result_theme() and printed without escaping into:

  • the value="{KEY}" attribute of the search input (attribute breakout, e.g. autofocus onfocus=...);
  • the <strong>{KEY}</strong> element of the "no results" message (full tag injection, e.g. <svg onload=...>).

Both the default and mobile_default themes are affected.

Proof of concept (the autofocus attribute makes the payload fire on page load without further interaction):

https://example.com/search/?q=%252522%252520autofocus%252520onfocus%25253D%252522alert(document.domain)

An unauthenticated attacker can craft such a link and send it to any visitor. When the victim opens it, arbitrary JavaScript runs in the origin of the NukeViet site. Session cookies are HttpOnly, so they cannot be read directly. However, the script can perform any same-origin action on behalf of the victim, including reading CSRF tokens and submitting forms. If the victim is a logged-in administrator, this can be used to perform administrative actions in the admin panel. The default Content Security Policy allows 'unsafe-inline', so it does not mitigate the attack.

Any site with the news module enabled is affected.

Affected versions: >= 4.5.00, <= 4.6.01. The vulnerable urldecode() call was introduced in commit 76ee0a8b9 (April 2021).

Patches

The vulnerability has been fixed in NukeViet 4.6.02. Users should upgrade to 4.6.02 or later.

The fix removes the extra urldecode() and the ad hoc filtering, and uses the output of get_title() directly. That output is already decoded and HTML-escaped, so it is safe both for SQL (via dblikeescape()) and for output in templates. The keyword length is still limited by NV_MAX_SEARCH_LENGTH.

Workarounds

If upgrading is not possible right away, apply the patch manually in modules/news/funcs/search.php by replacing:

$key = $nv_Request->get_title('q', 'get', '');
$key = str_replace(["'", '"', '<', '>', '&#039;', '&quot;', '&lt;', '&gt;'], '', $key);
$key = str_replace('+', ' ', urldecode($key));
$key = trim(nv_substr($key, 0, NV_MAX_SEARCH_LENGTH));
$keyhtml = nv_htmlspecialchars($key);

with:

$key = nv_substr($nv_Request->get_title('q', 'get', ''), 0, NV_MAX_SEARCH_LENGTH);

and replacing every use of $dbkeyhtml / $_dbkeyhtml with $dbkey / $_dbkey in the same file.

As a temporary mitigation, a WAF rule can reject requests to the news search page whose q parameter contains %25 (an encoded %), which blocks the multi-encoded payloads.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-94599 changed 2026-11-24CVE Terms of Use
GitHub Advisory DatabaseGHSA-3q6c-wfxw-7hj6 changed 2026-11-30CC-BY-4.0
NVDCVE-2026-94599 changed 2026-11-24Public domain