{"id":"CVE-2026-94564","aliases":["CVE-2026-94564","GHSA-7pv3-g7fw-7xhq"],"related":[],"kind":"vulnerability","state":"published","title":"NukeViet CMS: Unauthenticated Stored XSS in the Contact module via HTML sanitizer bypass","summary":"NukeViet CMS is a multi Content Management System. Prior to 4.6.01, an unauthenticated visitor can submit Contact module content containing numeric HTML entities with more than eight leading zeros in a URL-bearing attribute. NukeViet\\Core\\Request::unhtmlentities() does not decode that form before filterAttr() checks for a javascript: scheme, but browsers decode it when rendering the stored content. With an allowed tag such as the default iframe, the reconstructed script URL executes in the administration origin when staff view the message, permitting session-riding actions while remaining unable to read the HttpOnly session cookie directly. This issue is fixed in version 4.6.01.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"NukeViet CMS is a multi Content Management System. Prior to 4.6.01, an unauthenticated visitor can submit Contact module content containing numeric HTML entities with more than eight leading zeros in a URL-bearing attribute. NukeViet\\Core\\Request::unhtmlentities() does not decode that form before filterAttr() checks for a javascript: scheme, but browsers decode it when rendering the stored content. With an allowed tag such as the default iframe, the reconstructed script URL executes in the administration origin when staff view the message, permitting session-riding actions while remaining unable to read the HttpOnly session cookie directly. This issue is fixed in version 4.6.01.","source":"cvelist"},{"lang":"en","text":"## Summary\n\nAn unauthenticated stored Cross-Site Scripting (XSS) vulnerability exists in the **Contact** module of NukeViet CMS. An anonymous visitor can submit crafted HTML through the message content (`fcon`) field. The payload survives the server-side HTML sanitizer and is later rendered in the administration panel when an administrator (or the staff member responsible for Contact) opens the message, causing arbitrary JavaScript to execute in the admin origin.\n\n## Description\n\nThe root cause is in the HTML sanitizer `unhtmlentities()` / `filterAttr()` inside `vendor/vinades/nukeviet/Core/Request.php`.\n\nThe sanitizer decodes numeric HTML entities before checking attribute values for dangerous URL schemes such as `javascript:`. The decoding regular expression only tolerated a fixed number of leading zeros:\n\n```php\n$search = '/&#[xX]0{0,8}(...|6a|...);?/i';\n```\n\nBecause `0{0,8}` matches **at most 8** leading zeros, an entity with **9 or more** leading zeros is not decoded:\n\n```\n&#x0000000006a;   ->  the character 'j' (0x6A) is NOT decoded by the filter\n```\n\nThe subsequent scheme checks therefore inspect the still-encoded string and do not recognize the `javascript:` scheme, so the attribute is serialized and stored as-is. When the administrator's browser parses the stored markup, it decodes the numeric entity (browsers ignore an unlimited number of leading zeros), reconstructing a live `javascript:` URI:\n\n```html\n<iframe src=\"&#x0000000006a;avascript:...\">   ->   src=\"javascript:...\"\n```\n\nA secondary weakness contributed to the impact: the checks were performed against a canonicalized copy of the value, while the **original, un-canonicalized** value was the one serialized and stored, so any gap between the sanitizer's decoder and the browser's decoder became exploitable.\n\n### Proof of concept\n\n1. Open the public Contact form while unauthenticated:\n   `index.php?language=vi&nv=contact`\n2. Submit the form with the `fcon` field set to the URL-encoded payload:\n   ```\n   %3Ciframe%20src%3D%22%26%23x0000000006a%3Bavascript%3Aparent.location.href%3D%27https%3A%2F%2Fexample.com%2F%27%22%3E%3C%2Fiframe%3E\n   ```\n3. The message is accepted and stored.\n4. When an administrator opens the message in the admin panel, the injected\n   JavaScript executes in the administration origin.\n\n> Note: exploitation requires `iframe` (or another tag carrying a URL-bearing\n> attribute such as `a`, `object`, or `embed`) to be present in the site's allowed\n> HTML tags. `iframe` is included in the default `NV_ALLOWED_HTML_TAGS` list.\n\n### Impact\n\n_What kind of vulnerability is it? Who is impacted?_\n\nThis is an **unauthenticated stored XSS** (CWE-79). Any site running an affected version whose administrators view Contact messages is impacted.\n\nBecause the injected script runs inside the administrator's authenticated, same-origin session, it can:\n\n- read and exfiltrate data visible to the victim account (Contact messages, and\n  other admin content reachable via same-origin requests);\n- perform administrative write actions that do not require password\n  re-authentication, by reading anti-CSRF tokens directly from the page DOM.\n\nThe impact is bounded by existing platform controls: the PHP session cookie is enforced as `HttpOnly` (so the session identifier cannot be read via `document.cookie`), and sensitive operations are gated by a password re-authentication step. The attack is therefore confined to in-browser session-riding for the duration of the victim's session rather than a persistent account takeover.\n\n### Patches\n\n_Has the problem been patched? What versions should users upgrade to?_\n\nYes. The sanitizer in `vendor/vinades/nukeviet/Core/Request.php` has been fixed:\n\n1. The leading-zero bounds `{0,8}` in the numeric-entity decoding regular\n   expressions were replaced with `*`, so any number of leading zeros is decoded,\n   matching browser behavior.\n2. An independent browser-equivalent verification step was added in `filterAttr()`:\n   the value that is actually stored is re-decoded with PHP's native\n   `html_entity_decode()` (`ENT_QUOTES | ENT_HTML5`), control/whitespace characters\n   that browsers strip from URLs are removed, and the result is rejected if it\n   resolves to a script-executing scheme (`javascript:`, `vbscript:`, etc.).\n\nUsers should upgrade to the patched release that includes this fix.\n\n### Workarounds\n\n_Is there a way for users to fix or remediate the vulnerability without upgrading?_\n\nUntil the patch is applied, one or more of the following reduce exposure:\n\n- Remove `iframe` (and, if not required, `object` / `embed`) from the allowed HTML\n  tags in **Admin → Settings** so URL-bearing rich-HTML tags cannot be submitted\n  through public forms.\n- Apply the sanitizer changes described above directly to\n  `vendor/vinades/nukeviet/Core/Request.php`.\n- Configure a strict Content-Security-Policy for the administration area (for\n  example, a `script-src` without `'unsafe-inline'`) as a defense-in-depth layer.\n  Note that in the default configuration CSP is not applied to the main admin HTML\n  documents, so this requires additional wiring.","format":"markdown","source":"ghsa"}],"published":"2026-11-20T18:47:41.802Z","modified":"2026-11-30T20:45:09.933Z","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","CWE-172","CWE-184"],"affected":[{"ranges":[{"version":"< 4.6.01","status":"affected"}],"vendor":"nukeviet","product":"nukeviet","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"4.6.01"}],"ecosystem":"Packagist","package":"nukeviet/nukeviet","purl":"pkg:composer/nukeviet/nukeviet","source":"ghsa"}],"references":[{"url":"https://github.com/nukeviet/nukeviet/security/advisories/GHSA-7pv3-g7fw-7xhq","tags":["exploit","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/nukeviet/nukeviet/commit/e2441029b158b67cf396990230276ec67e05e2be","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/nukeviet/nukeviet/releases/tag/4.6.01","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nukeviet.vn/vi/news/Tin-tuc/thong-bao-phat-hanh-nukeviet-4-6-01-857.html","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-94564","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/nukeviet/nukeviet","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-11-20T19:13:15.408Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-94564","url":"https://www.cve.org/CVERecord?id=CVE-2026-94564","licence":"CVE Terms of Use","modified":"2026-11-20T19:13:45.868Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-7pv3-g7fw-7xhq","url":"https://github.com/advisories/GHSA-7pv3-g7fw-7xhq","licence":"CC-BY-4.0","modified":"2026-11-30T20:45:09.933Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-94564","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-94564","licence":"Public domain","modified":"2026-11-20T20:17:49.947Z"}],"updatedAt":"2026-11-30T20:57:26.531Z","epss":{"score":0.00595,"percentile":0.49811,"date":"2026-12-01T12:00:22.000Z"}}