# NukeViet CMS: Unauthenticated Stored XSS in the Contact Module

NukeViet's denylist sanitizer splits attributes on space only, so `<img src=x /onerror=...>` bypasses the `^on` filter and stores XSS that fires in the admin panel.

- Payout: Research
- Severity: critical
- Program: NukeViet
- Found by: mrlihd
- Disclosed: 2026-11-30
- CVE: CVE-2026-94565
- Write-up quality: 8/10
- Original: https://github.com/advisories/GHSA-662q-v5rm-78gm
- Library page: https://bugbountylibrary.com/r/ghsa%3AGHSA-662q-v5rm-78gm
- Tags: area:web domain:web impact:ato impact:integrity kind:research platform:ghsa sev:critical tech:php technique:parser-differential technique:source-review vuln:xss

**Target:** Contact module message field / admin contact view (PHP CMS)
**Root cause:** Request::filterTags tokenizes tag attributes splitting only on ASCII space, while browsers also treat `/` as an attribute separator; `/onerror` fails the `/^on/i` denylist but the browser parses it as `onerror`.
**Steps:**
1. As anonymous visitor open `/contact/` and set message field to `<img src=x /onerror=alert(document.domain)>`.
2. Solve CAPTCHA and submit (form returns `status: ok`).
3. Log in to admin panel, open Admin → Contact and view the message at `admin/index.php?nv=contact&op=view&id=<id>`.
4. `onerror` fires on view; `alert()` shows the panel's own origin.
**How found:** Code review of the central input filter: noticed the denylist strips attributes matching `/^on/i` but tokenizes attributes by splitting on space only, hypothesizing a parser differential with browsers that also split on `/`.
**Exploitation:** Unauthenticated attacker submits a contact message containing the payload; it is stored raw (no output encoding) and rendered into the admin contact view, which has no CSP, so the handler executes same-origin in any administrator's session that opens the message.
**Escalation:** Same-origin JS in admin session enables super admin account persistence and RCE via admin functions.
**Insight:** When auditing denylist HTML sanitizers, compare the filter's attribute tokenizer against the HTML spec's separator set (space, tab, LF, FF, CR, and `/`); a leading `/` before `on...` slips past `^on` checks while browsers still fire the handler.

## Proof of concept (copied exactly from the original report)

**Minimal stored XSS payload with slash-bypass**

```
<img src=x /onerror=alert(document.domain)>
```

