8.2high
NukeViet CMS: Stored XSS via internal marker injection in iframe srcdoc sanitization
- Severity
- 8.2high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.61% (higher than 50% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-p7cw-whjw-crcm
Description
NukeViet CMS is a multi Content Management System. From 4.5.08 until 4.5.12 and 4.6.02, an attacker can place NukeViet's internal {@[, ]@}, [@{, and }@] sanitizer markers in an iframe srcdoc value by encoding square brackets as HTML entities. Recursive NukeViet\Core\Request::filterTags() processing decodes the characters, accepts the forged marker, and later converts it to real markup without normal tag or attribute filtering. Because an unsandboxed srcdoc iframe shares the parent origin and iframe is enabled by default through NV_ALLOWED_HTML_TAGS, stored Contact messages, comments with the editor enabled, or submitted articles can execute JavaScript with the viewer's session. This issue is fixed in versions 4.5.12 and 4.6.02.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| nukeviet nukeviet | >= 4.5.08, < 4.5.12, >= 4.6.00, < 4.6.02 | CVE List |
| nukeviet/nukeviet (Packagist) | from 4.5.08 before 4.5.12, from 4.6.00 | GitHub Advisory Database |
All scores
| GitHub_M | 8.2high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N |
| GitHub | 8.2high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
NukeViet CMS is a multi Content Management System. From 4.5.08 until 4.5.12 and 4.6.02, an attacker can place NukeViet's internal {@[, ]@}, [@{, and }@] sanitizer markers in an iframe srcdoc value by encoding square brackets as HTML entities. Recursive NukeViet\Core\Request::filterTags() processing decodes the characters, accepts the forged marker, and later converts it to real markup without normal tag or attribute filtering. Because an unsandboxed srcdoc iframe shares the parent origin and iframe is enabled by default through NV_ALLOWED_HTML_TAGS, stored Contact messages, comments with the editor enabled, or submitted articles can execute JavaScript with the viewer's session. This issue is fixed in versions 4.5.12 and 4.6.02.
GitHub Advisory Database
Impact
A stored cross-site scripting (XSS) vulnerability exists in the HTML sanitizer of NukeViet\Core\Request (filterTags() and filterAttr()).
When an attribute contains HTML content (the srcdoc attribute of <iframe>), the sanitizer decodes its value and filters it again with filterTags(). Internally, filterTags() rebuilds allowed tags with placeholder markers ({@[, ]@}, [@{, }@]) and converts them back to <, > and " at the end. The input was never checked for these markers.
The characters [ and ] can be sent as HTML entities (for example [, [ or [), and they are decoded before the recursive call.
An attacker can therefore place markers inside a srcdoc value. These markers skip all tag and attribute filtering and are turned into real HTML tags.
A marker can also be formed by joining a marker generated by the sanitizer with attacker-controlled characters. In that case a generated tag is left unclosed, and the text that follows becomes attributes of that tag.
Example input:
<iframe srcdoc="{@[img src=x onerror=alert(document.domain)]@}"></iframe>
Stored output:
<iframe srcdoc="<img src=x onerror=alert(document.domain)>"></iframe>
The browser decodes the srcdoc attribute and renders <img src=x onerror=alert(document.domain)>. An srcdoc iframe without the sandbox attribute has the same origin as the parent page. The injected script can read the page and send requests with the victim's session.
The only requirement is that iframe is in the allowed HTML tags list (NV_ALLOWED_HTML_TAGS). iframe is allowed in the default configuration.
Every input read with $nv_Request->get_editor() is affected, for example:
- Comments, when the editor is enabled for comments. Any user allowed to comment can store the payload, and it runs for every visitor who views the comment.
- Messages sent through the contact form. The form is available to guests, and messages are displayed in the admin panel.
- Articles submitted by members in the news module.
Through the contact form, an unauthenticated attacker can run JavaScript in the administration origin when an administrator opens the message. The script can read data from the admin panel and perform administrative actions on the administrator's behalf. Session cookies are HttpOnly, so they cannot be read directly. The default Content-Security-Policy allows 'unsafe-inline' and does not block this attack.
Patches
The issue has been fixed in NukeViet 4.6.02.
filterTags()now encodes every[and]in its input before processing, so internal markers can no longer be forged or joined.- HTML content inside
srcdocis now restricted to the allowed HTML tags list, in the same way as top-level content.
Users should upgrade to version 4.6.02 or later.
Workarounds
If upgrading is not possible right away:
- Remove
iframefrom the allowed HTML tags list in Admin > Configuration > Setup security > HTML code was approved in the system. - Disable the editor for comments in the comment module settings.
- Apply the changes from the patch commit to
vendor/vinades/nukeviet/Core/Request.php.
These steps only block new payloads. Content that was stored before remains in the database. Search stored content (comments, contact messages, articles) for srcdoc and remove any suspicious entries.
Resources
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-94598 changed 2026-11-20 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-p7cw-whjw-crcm changed 2026-11-30 | CC-BY-4.0 |
| NVD | CVE-2026-94598 changed 2026-11-20 | Public domain |