CVE-2026-54064: NukeViet Cross-Site Scripting Vulnerability

HIGH
Advisory Identifier: GHSA-465g-4q99-5x86
CVSS 8.7
CWE-79
Published
Advisory Summary

CVE-2026-54064 is a HIGH (CVSS 8.7) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting NukeViet libraries in the Packagist ecosystem. The issue involves multiple anti-xss filter bypasses leading to stored xss in news module. Remediation is available by upgrading affected packages to version 4.6.00.

CVE-2026-54064 at a Glance

CVE Identifier CVE-2026-54064
GHSA Identifier GHSA-465g-4q99-5x86
Severity HIGH
CVSS v3.1 Base Score 8.7
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product NukeViet
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 8.7

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

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

How to Fix CVE-2026-54064

To remediate this vulnerability, upgrade all affected NukeViet 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.00
Upgrade nukeviet/nukeviet to 4.6.00
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-54064, inspect your project dependencies for NukeViet:

inspect dependencies for nukeviet/nukeviet

Analyze the terminal output to locate any version of NukeViet in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.6.00), 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-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In NukeViet, 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 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: ```php 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 (`&#9;`) inside `javascript:` URI `unhtmlentities()` strips the hex-encoded tab `&#x09;` via `str_ireplace`, but did **not** strip its decimal equivalent `&#9;`. 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&#9;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](jav&#9;ascript:alert('XSS')) ``` ## 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: ```php $attrSubSet[0] = preg_replace('/[\x00-\x20]/', '', strtolower($attrSubSet[0])); ``` 2. **`unhtmlentities()`** — strip decimal HTML entities for all ASCII control characters (0–31) before the keyword checks: ```php $value = preg_replace('/&#0*(?:3[01]|[12][0-9]|[0-9]);/', '', $value); ``` ## Workarounds None. Update to the patched version. ## Resources - CWE-79: Improper Neutralization of Input During Web Page Generation (Cross-site Scripting) - OWASP WSTG-INPV-02: Testing for Stored Cross Site Scripting - [OWASP Top 10 A03:2021 – Injection](https://owasp.org/Top10/A03_2021-Injection/)

CVE-2026-54064 Affected NukeViet Versions

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

References

Frequently Asked Questions

What is CVE-2026-54064?
CVE-2026-54064 is a security vulnerability in NukeViet involving Multiple Anti-XSS Filter Bypasses Leading to Stored XSS in News Module under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which NukeViet versions are affected?
Affected versions include releases prior to 4.6.00 across affected packages: nukeviet/nukeviet.
What version fixes CVE-2026-54064?
Upgrading to 4.6.00 (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.00. Upgrade your dependency to 4.6.00 or later.
What is the CVSS score of CVE-2026-54064?
CVE-2026-54064 has a CVSS v3.1 base score of 8.7 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N.
What CWE is associated with CVE-2026-54064?
CVE-2026-54064 is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.).
How can I check Packagist dependencies for CVE-2026-54064?
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-465g-4q99-5x86",
  "modified" : "2026-07-13T17:54:08Z",
  "published" : "2026-07-13T17:54:08Z",
  "aliases" : [ "CVE-2026-54064" ],
  "summary" : "NukeViet: Multiple Anti-XSS Filter Bypasses Leading to Stored XSS in News Module",
  "details" : "## Summary\n\nTwo 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.\n\n## Affected Component\n\n`vendor/vinades/nukeviet/Core/Request.php` — class `NukeViet\\Core\\Request`\n\n## Vulnerability Details\n\n### Bypass 1 — Form Feed character prefix (`\\x0C`) before event handler name\n\nThe `filterAttr()` method blocks event-handler attributes using:\n```php\npreg_match('/^on/i', $attrSubSet[0])\n```\nPHP'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.\n\n**Proof-of-concept payload (URL-encoded POST body field `bodyhtml`):**\n```\n<img src=\"x\" %0Conerror=\"alert('XSS')\">\n```\n\n### Bypass 2 — Decimal HTML entity tab (`&#9;`) inside `javascript:` URI\n\n`unhtmlentities()` strips the hex-encoded tab `&#x09;` via `str_ireplace`, but did **not** strip its decimal equivalent `&#9;`. 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&#9;ascript:alert()` passes the filter, is stored in the database, and is decoded by the browser into a working `javascript:` URI.\n\n**Proof-of-concept payload (inside a Markdown-style link):**\n```\n[Click me](jav&#9;ascript:alert('XSS'))\n```\n\n## Impact\n\nAn 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.\n\n## Patches\n\nFixed in commit `<commit-sha>` by modifying `vendor/vinades/nukeviet/Core/Request.php`:\n\n1. **`filterAttr()`** — strip all ASCII control characters (`\\x00`–`\\x20`) from the attribute name before the `/^on/` check:\n   ```php\n   $attrSubSet[0] = preg_replace('/[\\x00-\\x20]/', '', strtolower($attrSubSet[0]));\n   ```\n\n2. **`unhtmlentities()`** — strip decimal HTML entities for all ASCII control characters (0–31) before the keyword checks:\n   ```php\n   $value = preg_replace('/&#0*(?:3[01]|[12][0-9]|[0-9]);/', '', $value);\n   ```\n\n## Workarounds\n\nNone. Update to the patched version.\n\n## Resources\n\n- CWE-79: Improper Neutralization of Input During Web Page Generation (Cross-site Scripting)\n- OWASP WSTG-INPV-02: Testing for Stored Cross Site Scripting\n- [OWASP Top 10 A03:2021 – Injection](https://owasp.org/Top10/A03_2021-Injection/)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "nukeviet/nukeviet"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.6.00"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/nukeviet/nukeviet/security/advisories/GHSA-465g-4q99-5x86"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/nukeviet/nukeviet"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-07-13T17:54:08Z",
    "nvd_published_at" : null
  }
}