{"id":"CVE-2026-94565","aliases":["GHSA-662q-v5rm-78gm"],"url":"https://o3.security/vulnerability/CVE-2026-94565","summary":"NukeViet CMS: Unauthenticated Stored XSS in the Contact module","details":"### Summary\nA stored-XSS vulnerability in the Contact module allows any unauthenticated user to inject malicious Javascript.\n\n### Details\nNukeViet's central input filter (`NukeViet\\Core\\Request::filterTags`), applied to virtually all `POST` data, is a denylist HTML sanitizer. Its most important rule strips any attribute whose name matches `/^on/i` (event handlers). This rule is bypassable through an **HTML parser differential**: the filter tokenizes a tag's attributes by splitting on ASCII space (`0x20`) only, whereas browsers also separate attributes on `/`. By inserting a `/` immediately before an event-handler name, the attacker makes the filter read the attribute name as `/onerror` — which does **not** start with `on`, so the denylist misses it — while the browser parses it as `onerror` and fires it.\n\nThe payload survives the entire filter chain unmodified and is stored and served **raw** (no output encoding) into the administration panel, which sends **no Content-Security-Policy**:\n\n```\nINPUT  : <img src=x /onerror=alert(document.domain)>\nSTORED : <img src=\"x\" /onerror=\"alert(document.domain)\" />\nADMIN  : <td colspan=\"2\"><img src=\"x\" /onerror=\"alert(document.domain)\" /></td>\n```\n\nBecause the handler executes in the **same origin** as the admin panel, an unauthenticated attacker who submits a crafted contact message obtains arbitrary JavaScript execution in the session of any administrator who opens it — enabling administrator **account takeover**.\n\n### PoC\n#### Minimal payload\n\n```html\n<img src=x /onerror=alert(document.domain)>\n```\n\n`alert(document.domain)` displays the site's real origin (e.g. the target host), proving **same-origin** execution.\n\n#### Manual reproduction (fresh 4.6.00 install, default config)\n\n1. As an anonymous visitor open `/contact/`; set the **message** field to the payload above.\n2. Solve the CAPTCHA and submit (form returns `status: ok`).\n3. Log in to the admin panel; open **Admin → Contact** and view the message\n   (`admin/index.php?nv=contact&op=view&id=<id>`).\n4. `onerror` fires on view; `alert()` shows the panel's own origin.\n\n### Impact\nAn unauthenticated attacker achieves arbitrary JavaScript execution in the **same origin** as the NukeViet admin panel, running in the session of any administrator who views the malicious contact message. Possible attacks:\n1. Super admin account persistence\n2. RCE via admin functions\n\n### Mitigation\n1. **Tokenize attributes the way the HTML spec does.** In `filterTags()`, treat `/` (and all HTML    whitespace: tab, LF, FF, CR, space) as attribute separators, so `/onerror` is parsed as the token `onerror` and caught by the existing denylist. Equivalently, strip leading `/` and other non-name characters from the attribute name before the `^on` test.\n2. **Do not preserve non-conforming attribute names.** Reject/normalize any attribute whose name is not `[A-Za-z][A-Za-z0-9-]*` after normalization, rather than emitting `/onerror` verbatim.\n3. **Prefer an allowlist of attributes** over the `^on` denylist; drop anything not explicitly permitted for the element.","published":"2026-11-20T18:46:11.473Z","modified":"2026-11-21T21:00:57.340411433Z","cvss":{"score":9.3,"severity":"CRITICAL","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N"},"epss":{"score":0.00819,"percentile":0.5425,"asOf":"2026-11-30"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"Packagist","name":"nukeviet/nukeviet","fixedVersion":"4.6.01"}],"fix":{"url":"https://github.com/nukeviet/nukeviet/commit/ef90780e50d54384019a36aa2bcf9fd58776f698","label":"nukeviet/nukeviet@ef90780"},"references":[{"type":"WEB","url":"https://github.com/nukeviet/nukeviet/releases/tag/4.6.01"},{"type":"WEB","url":"https://nukeviet.vn/vi/news/Tin-tuc/thong-bao-phat-hanh-nukeviet-4-6-01-857.html"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/94xxx/CVE-2026-94565.json"},{"type":"ADVISORY","url":"https://github.com/nukeviet/nukeviet/security/advisories/GHSA-662q-v5rm-78gm"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-94565"},{"type":"FIX","url":"https://github.com/nukeviet/nukeviet/commit/ef90780e50d54384019a36aa2bcf9fd58776f698"},{"type":"PACKAGE","url":"https://github.com/nukeviet/nukeviet"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-11-21T21:00:57.340411433Z"}}