{"id":"CVE-2026-94599","aliases":["GHSA-3q6c-wfxw-7hj6"],"url":"https://o3.security/vulnerability/CVE-2026-94599","summary":"NukeViet CMS: Reflected XSS in news module search via double URL decoding of the q parameter","details":"### Impact\n\nThis is a reflected Cross-Site Scripting (XSS) vulnerability in the search function of the `news` module.\nIt is caused by the search keyword being URL-decoded after it has already been sanitized (CWE-174: Double Decoding of the Same Data).\n\nThe `q` parameter is read with `$nv_Request->get_title()`, which neutralizes `'`, `\"`, `<` and `>`.\nDuring that filtering, `%XX` sequences are resolved once more, so a value such as `%2522` becomes the literal text `%22` and passes the filter untouched.\n`modules/news/funcs/search.php` then called `urldecode()` on the filtered value, turning `%22` into a real `\"` after all sanitization had run.\nThe resulting raw keyword was passed to `search_theme()` and `search_result_theme()` and printed without escaping into:\n\n- the `value=\"{KEY}\"` attribute of the search input (attribute breakout, e.g. `autofocus onfocus=...`);\n- the `<strong>{KEY}</strong>` element of the \"no results\" message (full tag injection, e.g. `<svg onload=...>`).\n\nBoth the `default` and `mobile_default` themes are affected.\n\nProof of concept (the `autofocus` attribute makes the payload fire on page load without further interaction):\n\n```\nhttps://example.com/search/?q=%252522%252520autofocus%252520onfocus%25253D%252522alert(document.domain)\n```\n\nAn unauthenticated attacker can craft such a link and send it to any visitor.\nWhen the victim opens it, arbitrary JavaScript runs in the origin of the NukeViet site.\nSession cookies are `HttpOnly`, so they cannot be read directly.\nHowever, the script can perform any same-origin action on behalf of the victim, including reading CSRF tokens and submitting forms.\nIf the victim is a logged-in administrator, this can be used to perform administrative actions in the admin panel.\nThe default Content Security Policy allows `'unsafe-inline'`, so it does not mitigate the attack.\n\nAny site with the `news` module enabled is affected.\n\nAffected versions: `>= 4.5.00, <= 4.6.01`.\nThe vulnerable `urldecode()` call was introduced in commit `76ee0a8b9` (April 2021).\n\n### Patches\n\nThe vulnerability has been fixed in NukeViet `4.6.02`.\nUsers should upgrade to `4.6.02` or later.\n\nThe fix removes the extra `urldecode()` and the ad hoc filtering, and uses the output of `get_title()` directly.\nThat output is already decoded and HTML-escaped, so it is safe both for SQL (via `dblikeescape()`) and for output in templates.\nThe keyword length is still limited by `NV_MAX_SEARCH_LENGTH`.\n\n### Workarounds\n\nIf upgrading is not possible right away, apply the patch manually in `modules/news/funcs/search.php` by replacing:\n\n```php\n$key = $nv_Request->get_title('q', 'get', '');\n$key = str_replace([\"'\", '\"', '<', '>', '&#039;', '&quot;', '&lt;', '&gt;'], '', $key);\n$key = str_replace('+', ' ', urldecode($key));\n$key = trim(nv_substr($key, 0, NV_MAX_SEARCH_LENGTH));\n$keyhtml = nv_htmlspecialchars($key);\n```\n\nwith:\n\n```php\n$key = nv_substr($nv_Request->get_title('q', 'get', ''), 0, NV_MAX_SEARCH_LENGTH);\n```\n\nand replacing every use of `$dbkeyhtml` / `$_dbkeyhtml` with `$dbkey` / `$_dbkey` in the same file.\n\nAs 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.","published":"2026-11-20T18:53:10.216Z","modified":"2026-11-24T20:45:29.435358471Z","cvss":{"score":6.1,"severity":"MEDIUM","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"},"epss":{"score":0.00551,"percentile":0.3975,"asOf":"2026-11-30"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"Packagist","name":"nukeviet/nukeviet","fixedVersion":"4.5.13"},{"ecosystem":"Packagist","name":"nukeviet/nukeviet","fixedVersion":null}],"fix":{"url":"https://github.com/nukeviet/nukeviet/commit/3bfe2c541edf76dee309ffcdae7b1ecb91bf3467","label":"nukeviet/nukeviet@3bfe2c5"},"references":[{"type":"WEB","url":"https://github.com/nukeviet/nukeviet/blob/4.5.13/CHANGELOG.txt"},{"type":"WEB","url":"https://github.com/nukeviet/nukeviet/releases/tag/4.6.02"},{"type":"WEB","url":"https://nukeviet.vn/vi/news/Tin-tuc/thong-bao-phat-hanh-nukeviet-4-6-02-858.html"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/94xxx/CVE-2026-94599.json"},{"type":"ADVISORY","url":"https://github.com/nukeviet/nukeviet/security/advisories/GHSA-3q6c-wfxw-7hj6"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-94599"},{"type":"FIX","url":"https://github.com/nukeviet/nukeviet/commit/3bfe2c541edf76dee309ffcdae7b1ecb91bf3467"},{"type":"FIX","url":"https://github.com/nukeviet/nukeviet/commit/de6b594b2bed0b6976293eec3815230e1f3ffe63"},{"type":"PACKAGE","url":"https://github.com/nukeviet/nukeviet"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-11-24T20:45:29.435358471Z"}}