Summary
NukeViet CMS contains a stored cross-site scripting vulnerability in request filtering and entity decoding. A user with news-posting permission may be able to submit content that bypasses filtering and runs script in visitors' browsers when the content is displayed, potentially including for administrators.
Affected context
The issue occurs in NukeViet's request filtering and entity-decoding logic for submitted news content. Parser differences allow certain whitespace-prefixed event-handler attributes or a decimal HTML entity tab in a javascript: URI to survive these checks. The risk arises when a user with news-posting permission can submit affected content and that content is rendered for other users.
Exploit preconditions
- Attack surface: News content submitted to NukeViet CMS and later rendered to users
- Required access: A user account with news-posting permission
- Trigger point: A visitor or administrator views the persisted content
- Why exploitation is possible: Filtering and entity decoding do not consistently interpret whitespace and encoded characters the same way as browsers
Why this happens
The underlying issue is inadequate neutralization of untrusted content before it is rendered in a browser, mapping to CWE-79: Improper Neutralization of Input During Web Page Generation. The filtering and entity-decoding routines handle some representations differently from browser parsers, allowing script-bearing markup to remain active. This parser differential undermines the assumption that filtered content is safe for HTML output.
Potential impact
- Script may execute in the context of a visitor's browser when affected content is viewed
- An attacker could potentially perform actions as the affected user or access data available to their session
- Administrator accounts may also be exposed if they view the content
- Persistent content could affect multiple users over time
General mitigation guidance
Defensive patterns include consistently treating submitted content as untrusted and preventing it from becoming executable browser content.
- Prefer context-aware output encoding and safe rendering mechanisms over blacklist-based filtering
- Use a well-maintained HTML sanitization approach that accounts for browser parsing behavior
- Normalize input consistently before validation, and reject or safely encode ambiguous representations
- Apply least privilege to content-authoring roles and limit who can publish user-submitted content
- Use secure-by-default content handling that disables active markup unless it is explicitly required
How teams detect issues like this
- Review request filtering and entity-decoding code for inconsistent handling of whitespace, character references, and URL schemes
- Use static analysis to identify untrusted content reaching HTML output without context-aware encoding or sanitization
- Review code changes to content filters and rendering paths for browser/parser differential risks
- Enforce policies requiring approved output-encoding and HTML-sanitization APIs
- Test rendered content with security-focused checks in a controlled environment; automated review tools may help identify risky patterns

