/

CVE-2026-41147

Severity:

HIGH RISK

(8.7)

Cross-Site Scripting (XSS) in NukeViet CMS Request Handling

CVE-2026-41147

Deferred

Vulnerability type

Category:

Cross-Site Scripting (XSS)

CWE:

CWE-79

Impact:

Stored Cross-Site Scripting leading to account compromise and unauthorized actions

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 CMS up to version 4.5.07 contains a stored cross-site scripting (XSS) vulnerability in its Request class due to insufficient server-side sanitization of user-submitted HTML content.

An anonymous attacker can inject malicious scripts that are stored on the server and later executed in the browsers of users who view the affected content, potentially leading to session hijacking, account misuse, and phishing attacks.

Affected context

The vulnerability arises in contexts where NukeViet CMS accepts rich user-generated content via HTTP requests, such as contact forms, comments, or similar modules.

The Request class performs only limited or client-side-centric filtering of HTML tags and attributes, allowing crafted requests to bypass protections when client-side checks are tampered with or skipped.

Any feature that stores user input and later renders it in other users' browsers without robust server-side sanitization is potentially affected, irrespective of the specific module used as the original proof of concept.

Exploit preconditions

  • Attack surface: Public-facing endpoints that accept user-submitted content (e.g., contact forms, comments, messages).
  • Required access: None beyond the ability to submit HTTP requests; exploitation can be performed by unauthenticated, anonymous visitors.
  • Trigger point: Viewing of stored, attacker-controlled content by another user (including administrators or moderators) in a browser.
  • Why exploitation is possible: The server trusts client-side filtering and lacks comprehensive server-side sanitization/encoding of dangerous HTML tags and attributes, allowing malicious script injection to be stored and later executed when rendered.

Why this happens

The root cause aligns with CWE-79: Improper Neutralization of Input During Web Page Generation (Cross-site Scripting).

The Request class relies heavily on client-side filtering to remove or constrain HTML tags and attributes, assuming user agents will not bypass those checks.

By not performing rigorous server-side sanitization and encoding before storing and rendering user input, the application generates HTML pages that directly embed untrusted content.

This design allows crafted payloads that include script-capable constructs (e.g., dangerous tags, attributes, or event handlers) to persist in the system and execute in users' browsers when the affected content is displayed.

Potential impact

  • Session hijacking through theft of cookies or session tokens, subject to cookie flags and browser protections.
  • Execution of unauthorized actions in the application under the victim's identity (stored XSS-driven CSRF-like behavior).
  • Defacement of pages or injection of misleading content, including redirects to phishing or malicious sites.
  • Targeted phishing or social engineering via manipulated content and email notifications that embed attacker-controlled HTML.
  • Exposure of sensitive information accessible within the victim's authenticated context (e.g., administrative views).

General mitigation guidance

Effective mitigation focuses on enforcing server-side trust boundaries and applying defense-in-depth for untrusted HTML.

Recommended patterns include:

  • Implement robust server-side HTML sanitization in the input handling layer (such as the Request class), normalizing or stripping unsafe tags (e.g., <script>, <iframe>, embedded objects) and attributes (e.g., srcdoc, javascript: URLs, event handlers like onerror/onload).
  • Prefer a default-deny sanitization model where only a minimal, explicitly allowed subset of tags and attributes is permitted, rather than attempting to blacklist dangerous constructs.
  • Apply context-appropriate output encoding (e.g., HTML, attribute, URL encoding) when rendering user-provided data back into views.
  • Use templating systems and helper APIs that encode values by default, reducing the chance of raw injection into HTML, attributes, or script contexts.
  • Enforce a restrictive Content Security Policy (CSP) that, where feasible, disallows inline scripts, limits script sources to trusted origins, and reduces the impact of any injected markup.
  • Configure cookies associated with authenticated sessions using HttpOnly and, as applicable, Secure and SameSite attributes so that even if XSS occurs, direct cookie access and cross-site attacks are harder to achieve.

How teams detect issues like this

Detection generally involves both code-centric and behavior-centric approaches:

  • Static analysis and linting: Use rules that flag direct insertion of request parameters or user-controlled fields into HTML responses without sanitization or encoding, especially within core input-handling classes like the Request layer.
  • Code review practices: During manual review, pay attention to any server-side logic that relies on client-side validation for security, or that passes raw or minimally processed user input into templates, HTML attributes, or script blocks.
  • Template and rendering checks: Audit templates for any instances where escaping is disabled or bypassed, and ensure default-escape mechanisms are consistently applied.
  • Security testing and fuzzing: Employ automated scanners or manual penetration testing that injects XSS test payloads into input fields and verifies whether they are reflected or stored and later executed when content is viewed.
  • Policy enforcement: Integrate pre-commit or CI policies that disallow unsafe HTML rendering helpers or patterns, and require use of standardized sanitization/encoding utility functions.

Sources

SourceLink
github.comgithub.com/nukeviet/nukeviet/commit/2a0860fbe22e2f6a3b90f802bf80b25e18699611
github.comgithub.com/nukeviet/nukeviet/releases/tag/4.5.08
github.comgithub.com/nukeviet/nukeviet/security/advisories/GHSA-64rr-pp78-62ww

Frequently asked

questions

Yes. Any remote, unauthenticated user who can submit content to affected components can attempt to exploit the stored XSS by injecting malicious HTML or script-capable constructs.

The attacker typically needs only the ability to send HTTP requests to publicly exposed endpoints that accept user input; no valid account or special privileges are required if anonymous submissions are enabled.

The safest pattern is to treat all user-supplied content as untrusted, apply strong server-side sanitization and context-appropriate output encoding, and avoid relying on client-side checks for security. Additionally, adopt templating and helper APIs that encode by default to reduce the possibility of injection.

Prevention strategies include institutionalizing server-side validation and sanitization for all user inputs, enforcing secure coding guidelines for HTML rendering, adopting default-escaping template engines, using CSP as a secondary control, and integrating static analysis and security testing into the development lifecycle to detect unsafe patterns early.

Find out what's already
exploitable in your codebase.