CVE-2026-94564: NukeViet CMS Cross-Site Scripting Vulnerability

HIGH
Advisory Identifier: GHSA-7pv3-g7fw-7xhq
CVSS 8.2
CWE-172 CWE-79 CWE-184
Published
Advisory Summary

CVE-2026-94564 is a HIGH (CVSS 8.2) cross-site scripting vulnerability (CWE-172: Encoding Error) affecting NukeViet CMS libraries in the Packagist ecosystem. The issue involves unauthenticated stored xss in the contact module via html sanitizer bypass. Remediation is available by upgrading affected packages to version 4.6.01.

CVE-2026-94564 at a Glance

CVE Identifier CVE-2026-94564
GHSA Identifier GHSA-7pv3-g7fw-7xhq
Severity HIGH
CVSS v3.1 Base Score 8.2
CWE Classification CWE-172: Encoding Error
Affected Product NukeViet CMS
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 8.2

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2026-94564

To remediate this vulnerability, upgrade all affected NukeViet CMS dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

nukeviet/nukeviet fixed: 4.6.01
Upgrade nukeviet/nukeviet to 4.6.01
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for nukeviet/nukeviet

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-94564, inspect your project dependencies for NukeViet CMS:

inspect dependencies for nukeviet/nukeviet

Analyze the terminal output to locate any version of NukeViet CMS in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.6.01), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-172: Encoding Error, where the product does not properly encode or decode the data, resulting in unexpected values. In NukeViet CMS, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## Summary An 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. ## Description The root cause is in the HTML sanitizer `unhtmlentities()` / `filterAttr()` inside `vendor/vinades/nukeviet/Core/Request.php`. The 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: ```php $search = '/&#[xX]0{0,8}(...|6a|...);?/i'; ``` Because `0{0,8}` matches **at most 8** leading zeros, an entity with **9 or more** leading zeros is not decoded: ``` &#x0000000006a; -> the character 'j' (0x6A) is NOT decoded by the filter ``` The 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: ```html <iframe src="&#x0000000006a;avascript:..."> -> src="javascript:..." ``` A 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. ### Proof of concept 1. Open the public Contact form while unauthenticated: `index.php?language=vi&nv=contact` 2. Submit the form with the `fcon` field set to the URL-encoded payload: ``` %3Ciframe%20src%3D%22%26%23x0000000006a%3Bavascript%3Aparent.location.href%3D%27https%3A%2F%2Fexample.com%2F%27%22%3E%3C%2Fiframe%3E ``` 3. The message is accepted and stored. 4. When an administrator opens the message in the admin panel, the injected JavaScript executes in the administration origin. > Note: exploitation requires `iframe` (or another tag carrying a URL-bearing > attribute such as `a`, `object`, or `embed`) to be present in the site's allowed > HTML tags. `iframe` is included in the default `NV_ALLOWED_HTML_TAGS` list. ### Impact _What kind of vulnerability is it? Who is impacted?_ This is an **unauthenticated stored XSS** (CWE-79). Any site running an affected version whose administrators view Contact messages is impacted. Because the injected script runs inside the administrator's authenticated, same-origin session, it can: - read and exfiltrate data visible to the victim account (Contact messages, and other admin content reachable via same-origin requests); - perform administrative write actions that do not require password re-authentication, by reading anti-CSRF tokens directly from the page DOM. The 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. ### Patches _Has the problem been patched? What versions should users upgrade to?_ Yes. The sanitizer in `vendor/vinades/nukeviet/Core/Request.php` has been fixed: 1. The leading-zero bounds `{0,8}` in the numeric-entity decoding regular expressions were replaced with `*`, so any number of leading zeros is decoded, matching browser behavior. 2. An independent browser-equivalent verification step was added in `filterAttr()`: the value that is actually stored is re-decoded with PHP's native `html_entity_decode()` (`ENT_QUOTES | ENT_HTML5`), control/whitespace characters that browsers strip from URLs are removed, and the result is rejected if it resolves to a script-executing scheme (`javascript:`, `vbscript:`, etc.). Users should upgrade to the patched release that includes this fix. ### Workarounds _Is there a way for users to fix or remediate the vulnerability without upgrading?_ Until the patch is applied, one or more of the following reduce exposure: - Remove `iframe` (and, if not required, `object` / `embed`) from the allowed HTML tags in **Admin → Settings** so URL-bearing rich-HTML tags cannot be submitted through public forms. - Apply the sanitizer changes described above directly to `vendor/vinades/nukeviet/Core/Request.php`. - Configure a strict Content-Security-Policy for the administration area (for example, a `script-src` without `'unsafe-inline'`) as a defense-in-depth layer. Note that in the default configuration CSP is not applied to the main admin HTML documents, so this requires additional wiring.

CVE-2026-94564 Affected NukeViet CMS Versions

1 component(s)
Fixed Versions:
4.6.01
Product / Package Ecosystem Affected Versions Fixed Version
nukeviet/nukeviet
Packagist
< 4.6.01
4.6.01

References

Frequently Asked Questions

What is CVE-2026-94564?
CVE-2026-94564 is a security vulnerability in NukeViet CMS involving Unauthenticated Stored XSS in the Contact Module via HTML Sanitizer Bypass under CWE-172: Encoding Error.
Which NukeViet CMS versions are affected?
Affected versions include releases prior to 4.6.01 across affected packages: nukeviet/nukeviet.
What version fixes CVE-2026-94564?
Upgrading to 4.6.01 (or the latest patched release for your respective branch) resolves the vulnerability.
Is nukeviet/nukeviet affected?
Yes, nukeviet/nukeviet is affected in releases prior to 4.6.01. Upgrade your dependency to 4.6.01 or later.
What is the CVSS score of CVE-2026-94564?
CVE-2026-94564 has a CVSS v3.1 base score of 8.2 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N.
What CWE is associated with CVE-2026-94564?
CVE-2026-94564 is classified under CWE-172: Encoding Error (The product does not properly encode or decode the data, resulting in unexpected values.).
How can I check Packagist dependencies for CVE-2026-94564?
Run the dependency tree command: 'inspect dependencies for nukeviet/nukeviet'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-7pv3-g7fw-7xhq",
  "modified" : "2026-11-30T20:37:39Z",
  "published" : "2026-11-30T20:37:39Z",
  "aliases" : [ "CVE-2026-94564" ],
  "summary" : "NukeViet CMS: Unauthenticated Stored XSS in the Contact Module via HTML Sanitizer Bypass",
  "details" : "## 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.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "nukeviet/nukeviet"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.6.01"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/nukeviet/nukeviet/security/advisories/GHSA-7pv3-g7fw-7xhq"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-94564"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/nukeviet/nukeviet/commit/e2441029b158b67cf396990230276ec67e05e2be"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/nukeviet/nukeviet"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/nukeviet/nukeviet/releases/tag/4.6.01"
  }, {
    "type" : "WEB",
    "url" : "https://nukeviet.vn/vi/news/Tin-tuc/thong-bao-phat-hanh-nukeviet-4-6-01-857.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-172", "CWE-184", "CWE-79" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-11-30T20:37:39Z",
    "nvd_published_at" : "2026-11-20T19:18:56Z"
  }
}