{"id":"CVE-2026-94598","aliases":["CVE-2026-94598","GHSA-p7cw-whjw-crcm"],"related":[],"kind":"vulnerability","state":"published","title":"NukeViet CMS: Stored XSS via internal marker injection in iframe srcdoc sanitization","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Impact\n\nA stored cross-site scripting (XSS) vulnerability exists in the HTML sanitizer of `NukeViet\\Core\\Request` (`filterTags()` and `filterAttr()`).\n\nWhen 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.\n\nThe characters `[` and `]` can be sent as HTML entities (for example `&#91;`, `&#x5b;` or `&lbrack;`), and they are decoded before the recursive call.\n\nAn attacker can therefore place markers inside a `srcdoc` value. These markers skip all tag and attribute filtering and are turned into real HTML tags.\n\nA 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.\n\nExample input:\n\n```html\n<iframe srcdoc=\"{@[img src=x onerror=alert(document.domain)]@}\"></iframe>\n```\n\nStored output:\n\n```html\n<iframe srcdoc=\"&lt;img src=x onerror=alert(document.domain)&gt;\"></iframe>\n```\n\nThe 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.\n\nThe only requirement is that `iframe` is in the allowed HTML tags list (`NV_ALLOWED_HTML_TAGS`). `iframe` is allowed in the default configuration.\n\nEvery input read with `$nv_Request->get_editor()` is affected, for example:\n\n- 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.\n- Messages sent through the contact form. The form is available to guests, and messages are displayed in the admin panel.\n- Articles submitted by members in the news module.\n\nThrough 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.\n\n### Patches\n\nThe issue has been fixed in NukeViet 4.6.02.\n\n- `filterTags()` now encodes every `[` and `]` in its input before processing, so internal markers can no longer be forged or joined.\n- HTML content inside `srcdoc` is now restricted to the allowed HTML tags list, in the same way as top-level content.\n\nUsers should upgrade to version 4.6.02 or later.\n\n### Workarounds\n\nIf upgrading is not possible right away:\n\n- Remove `iframe` from the allowed HTML tags list in Admin > Configuration > Setup security > HTML code was approved in the system.\n- Disable the editor for comments in the comment module settings.\n- Apply the changes from the patch commit to `vendor/vinades/nukeviet/Core/Request.php`.\n\nThese 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.\n\n### Resources\n\n- https://github.com/nukeviet/nukeviet/commit/81a021a6557477efe5a4c713e21b883d138002e6\n- https://cwe.mitre.org/data/definitions/79.html\n- https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#srcdoc\n- https://cheatsheetseries.owasp.org/cheatsheets/Cross_Site_Scripting_Prevention_Cheat_Sheet.html","format":"markdown","source":"ghsa"}],"published":"2026-11-20T19:02:26.754Z","modified":"2026-11-30T21:15:10.388Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N","score":8.2,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N","score":8.2,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N","score":8.2,"rating":"HIGH"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"version":">= 4.5.08, < 4.5.12","status":"affected"},{"version":">= 4.6.00, < 4.6.02","status":"affected"}],"vendor":"nukeviet","product":"nukeviet","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"4.5.08","status":"affected","fixed":"4.5.12"}],"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-p7cw-whjw-crcm","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/nukeviet/nukeviet/commit/13d83ff45072730d10de89195da2154c896d6968","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/nukeviet/nukeviet/commit/81a021a6557477efe5a4c713e21b883d138002e6","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-94598","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-20T19:12:13.612Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-94598","url":"https://www.cve.org/CVERecord?id=CVE-2026-94598","licence":"CVE Terms of Use","modified":"2026-11-20T19:12:30.217Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-p7cw-whjw-crcm","url":"https://github.com/advisories/GHSA-p7cw-whjw-crcm","licence":"CC-BY-4.0","modified":"2026-11-30T21:15:10.388Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-94598","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-94598","licence":"Public domain","modified":"2026-11-20T19:18:57.090Z"}],"updatedAt":"2026-11-30T21:27:24.946Z","epss":{"score":0.00609,"percentile":0.5055,"date":"2026-12-01T12:00:22.000Z"}}