GHSA-465g-4q99-5x86: NukeViet: Multiple Anti-XSS Filter Bypasses Leading to Stored XSS in News Module
Summary
Two filter-bypass techniques in NukeViet\Core\Request::filterAttr() and NukeViet\Core\Request::unhtmlentities() allow a low-privileged user (any account with news post permission) to store and serve arbitrary JavaScript to any visitor of the affected page.
Affected Component
vendor/vinades/nukeviet/Core/Request.php — class NukeViet\Core\Request
Vulnerability Details
Bypass 1 — Form Feed character prefix (\x0C) before event handler name
The filterAttr() method blocks event-handler attributes using:
preg_match('/^on/i', $attrSubSet[0])
PHP's trim() does not strip the ASCII Form Feed character (\x0C, U+000C). An attacker can prefix the attribute name with \x0C so that \x0Conerror does not match /^on/. The HTML5 browser parser treats \x0C as a valid whitespace separator and correctly activates the event handler.
Proof-of-concept payload (URL-encoded POST body field bodyhtml):
<img src="x" %0Conerror="alert('XSS')">
Bypass 2 — Decimal HTML entity tab ( ) inside javascript: URI
unhtmlentities() strips the hex-encoded tab via str_ireplace, but did not strip its decimal equivalent . The keyword-blocking regex /j\s*a\s*v\s*a\s*s\s*c\s*r\s*i\s*p\s*t/si uses \s* which does not match HTML entities. The value jav ascript:alert() passes the filter, is stored in the database, and is decoded by the browser into a working javascript: URI.
Proof-of-concept payload (inside a Markdown-style link):
Click me)
Impact
An authenticated attacker with news-posting permission can inject persistent JavaScript that executes in the browser of any user (including administrators) who views the affected article. This enables session cookie theft, credential harvesting, defacement, and further privilege escalation.
Patches
Fixed in commit <commit-sha> by modifying vendor/vinades/nukeviet/Core/Request.php:
1. filterAttr() — strip all ASCII control characters (\x00–\x20) from the attribute name before the /^on/ check:
$attrSubSet[0] = preg_replace('/[\x00-\x20]/', '', strtol
Details
Original advisory: https://github.com/advisories/GHSA-465g-4q99-5x86
Referenced CVEs
| CVE | CSIRTS overview | External |
|---|---|---|
| CVE-2026-54064 | coverage & exploitation status | NVD · CVE.org |
More from GitHub Security Advisories
- mediumGHSA-jr6p-8pjj-mfx6: Capsule has an incomplete fix of CVE-2026-22872: TenantResource RawItems and Generators s…2026-07-31
- mediumGHSA-68cj-mvg9-rgm2: Capsule: CapsuleConfiguration NodeMetadata regex fields lack webhook validation, allowing…2026-07-31
- mediumGHSA-ff84-5f28-78qj: re2: Out-of-bounds heap read in `exec`/`test`/`match` via attacker-influenced `lastIndex`…2026-07-31
- mediumGHSA-6hxr-mr5r-9836: re2: Global `String.prototype.match` with an empty-matchable pattern never advances → inf…2026-07-31
- mediumGHSA-x83g-979r-f5fh: Sylius Mollie Plugin has unauthenticated IDOR that leaks order token and customer PII2026-07-31