CVE-2026-94564
JSON

8.2high

NukeViet CMS: Unauthenticated Stored XSS in the Contact module via HTML sanitizer bypass

Severity
8.2high CVSS:3.1 by GitHub_M
Exploit likelihood
0.60% (higher than 49% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-7pv3-g7fw-7xhq

Description

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.

Affected

Product or packageVersionsReported by
nukeviet nukeviet< 4.6.01CVE List
nukeviet/nukeviet (Packagist)before 4.6.01GitHub Advisory Database

All scores

GitHub_M8.2high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N
GitHub8.2high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N

Classification

CWE-79CWE-172CWE-184

SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.

What each source says

CVE List

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.

GitHub Advisory Database

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:

$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:

<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.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-94564 changed 2026-11-20CVE Terms of Use
GitHub Advisory DatabaseGHSA-7pv3-g7fw-7xhq changed 2026-11-30CC-BY-4.0
NVDCVE-2026-94564 changed 2026-11-20Public domain