9.3critical
NukeViet CMS: Unauthenticated Stored XSS in the Contact module
- Severity
- 9.3critical CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.82% (higher than 54% of CVEs)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-662q-v5rm-78gm
Description
NukeViet CMS is a multi Content Management System. From the 3.x release line until 4.6.01, an unauthenticated visitor can submit a Contact module message containing an event-handler attribute prefixed by a slash. NukeViet\Core\Request::filterTags() tokenizes attributes using only ASCII spaces, so it sees /onerror and misses the ^on denylist, while the browser treats the slash as a separator and activates onerror. The message is stored and rendered without output encoding in the administration panel, which lacks a Content Security Policy, allowing same-origin JavaScript execution when an administrator opens the message. This issue is fixed in version 4.6.01.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| nukeviet nukeviet | >= 3.0.0, < 4.6.01 | CVE List |
| nukeviet/nukeviet (Packagist) | from 3.0.0 before 4.6.01 | GitHub Advisory Database |
All scores
| GitHub_M | 9.3critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N |
| GitHub | 9.3critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N |
Classification
SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total.
What each source says
CVE List
NukeViet CMS is a multi Content Management System. From the 3.x release line until 4.6.01, an unauthenticated visitor can submit a Contact module message containing an event-handler attribute prefixed by a slash. NukeViet\Core\Request::filterTags() tokenizes attributes using only ASCII spaces, so it sees /onerror and misses the ^on denylist, while the browser treats the slash as a separator and activates onerror. The message is stored and rendered without output encoding in the administration panel, which lacks a Content Security Policy, allowing same-origin JavaScript execution when an administrator opens the message. This issue is fixed in version 4.6.01.
GitHub Advisory Database
Summary
A stored-XSS vulnerability in the Contact module allows any unauthenticated user to inject malicious Javascript.
Details
NukeViet'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.
The 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:
INPUT : <img src=x /onerror=alert(document.domain)>
STORED : <img src="x" /onerror="alert(document.domain)" />
ADMIN : <td colspan="2"><img src="x" /onerror="alert(document.domain)" /></td>
Because 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.
PoC
Minimal payload
<img src=x /onerror=alert(document.domain)>
alert(document.domain) displays the site's real origin (e.g. the target host), proving same-origin execution.
Manual reproduction (fresh 4.6.00 install, default config)
- As an anonymous visitor open
/contact/; set the message field to the payload above. - Solve the CAPTCHA and submit (form returns
status: ok). - Log in to the admin panel; open Admin → Contact and view the message
(
admin/index.php?nv=contact&op=view&id=<id>). onerrorfires on view;alert()shows the panel's own origin.
Impact
An 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:
- Super admin account persistence
- RCE via admin functions
Mitigation
- Tokenize attributes the way the HTML spec does. In
filterTags(), treat/(and all HTML whitespace: tab, LF, FF, CR, space) as attribute separators, so/onerroris parsed as the tokenonerrorand caught by the existing denylist. Equivalently, strip leading/and other non-name characters from the attribute name before the^ontest. - 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/onerrorverbatim. - Prefer an allowlist of attributes over the
^ondenylist; drop anything not explicitly permitted for the element.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-94565 changed 2026-11-20 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-662q-v5rm-78gm changed 2026-11-30 | CC-BY-4.0 |
| NVD | CVE-2026-94565 changed 2026-11-20 | Public domain |