{"id":"CVE-2026-94599","aliases":["CVE-2026-94599","GHSA-3q6c-wfxw-7hj6"],"related":[],"kind":"vulnerability","state":"published","title":"NukeViet CMS: Reflected XSS in news module search via double URL decoding of the q parameter","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### 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.","format":"markdown","source":"ghsa"}],"published":"2026-11-20T18:53:10.216Z","modified":"2026-11-30T21:45:08.714Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"}],"cwes":["CWE-79","CWE-174"],"affected":[{"ranges":[{"version":">= 4.5.00, < 4.5.13","status":"affected"},{"version":">= 4.6.00, < 4.6.02","status":"affected"}],"vendor":"nukeviet","product":"nukeviet","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"4.5.00","status":"affected","fixed":"4.5.13"}],"ecosystem":"Packagist","package":"nukeviet/nukeviet","purl":"pkg:composer/nukeviet/nukeviet","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"4.6.00","status":"affected"}],"ecosystem":"Packagist","package":"nukeviet/nukeviet","purl":"pkg:composer/nukeviet/nukeviet","source":"ghsa"}],"references":[{"url":"https://github.com/nukeviet/nukeviet/security/advisories/GHSA-3q6c-wfxw-7hj6","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/nukeviet/nukeviet/commit/3bfe2c541edf76dee309ffcdae7b1ecb91bf3467","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/nukeviet/nukeviet/commit/de6b594b2bed0b6976293eec3815230e1f3ffe63","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/nukeviet/nukeviet/blob/4.5.13/CHANGELOG.txt","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/nukeviet/nukeviet/releases/tag/4.6.02","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nukeviet.vn/vi/news/Tin-tuc/thong-bao-phat-hanh-nukeviet-4-6-02-858.html","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-94599","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/nukeviet/nukeviet","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-11-24T00:22:28.795Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-94599","url":"https://www.cve.org/CVERecord?id=CVE-2026-94599","licence":"CVE Terms of Use","modified":"2026-11-24T00:53:41.445Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-3q6c-wfxw-7hj6","url":"https://github.com/advisories/GHSA-3q6c-wfxw-7hj6","licence":"CC-BY-4.0","modified":"2026-11-30T21:45:08.714Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-94599","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-94599","licence":"Public domain","modified":"2026-11-24T01:17:36.053Z"}],"updatedAt":"2026-11-30T22:07:25.712Z","epss":{"score":0.00551,"percentile":0.3975,"date":"2026-11-30T12:00:22.000Z"}}