/

CVE-2026-49259

Severity:

HIGH RISK

(8.7)

Stored Cross-Site Scripting (CWE-79) in NukeViet Comments

CVE-2026-49259

Received

Vulnerability type

Category:

Stored Cross-Site Scripting

CWE:

CWE-79

Impact:

Same-origin JavaScript execution

Severity:

HIGH RISK

(8.7)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

NukeViet can store script-breaking content in profile name fields that are later used to build comment display names. When a visitor clicks a Reply link, the content may escape the inline JavaScript context and run in the visitor's origin, potentially affecting authenticated users such as administrators.

Affected context

The issue occurs in NukeViet CMS comment templates where the comment display name is interpolated into an inline onclick handler for reply links. It may affect deployments where a low-privileged authenticated user can set profile name fields and their content is later rendered without encoding appropriate to the JavaScript context.

Exploit preconditions

  • Attack surface: Comment display and reply links in the affected NukeViet themes
  • Required access: An authenticated account with permission to set profile name fields
  • Trigger point: A visitor clicks a Reply link displaying the crafted comment name
  • Why exploitation is possible: Content is inserted into an inline JavaScript string, where browser decoding of HTML numeric references can expose script-breaking characters before JavaScript parsing

Why this happens

The root cause is unsafe handling of untrusted data across HTML and JavaScript contexts. The comment name is interpolated into an inline event handler, while HTML numeric references are decoded by the browser before the JavaScript is parsed. Encoding suitable for HTML output is not necessarily safe for a JavaScript string, which maps to CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').

Potential impact

  • Attacker-controlled JavaScript could run in a visitor's browser under the NukeViet origin
  • A script could access or act on data available to the affected user, subject to browser and application protections
  • An administrator's authenticated session could be exposed to unauthorized actions
  • The site's content or user experience could be altered for visitors

General mitigation guidance

Defensive patterns focus on keeping untrusted profile data inert in every output context.

  • Prefer event listeners over inline event handlers, and pass data through safe DOM APIs
  • Apply context-aware output encoding at the point where values enter HTML or JavaScript
  • Treat profile fields as untrusted even when they are stored in the application
  • Validate input against reasonable field requirements, while not relying on validation as a substitute for output encoding
  • Limit account privileges and access to sensitive administrative functions

How teams detect issues like this

  • Use static analysis to identify untrusted values interpolated into inline event handlers or JavaScript strings
  • Review templates for profile-derived data rendered in executable contexts
  • Apply code review checks requiring context-aware encoding and discouraging inline handlers
  • Use security tests and policy checks to verify that stored user content remains inert when rendered

Sources

SourceLink
github.comgithub.com/nukeviet/nukeviet/commit/8dfad9d4d3e44b970a7816f60705235e6c0ee604
github.comgithub.com/nukeviet/nukeviet/releases/tag/4.5.09
github.comgithub.com/nukeviet/nukeviet/security/advisories/GHSA-w2w5-w2pw-r929

Frequently asked

questions

The description indicates that a low-privileged authenticated user can set the relevant profile fields.

The described trigger is clicking a Reply link whose comment display name contains the stored content.

Avoid placing untrusted data in inline JavaScript. Prefer event listeners and safe data passing, with encoding appropriate to the output context.

Treat stored user content as untrusted, review templates for unsafe JavaScript interpolation, and enforce context-aware output handling through code review and automated checks.

Find out what's already
exploitable in your codebase.