/

CVE-2026-94598

Severity:

HIGH RISK

(8.2)

Stored XSS (CWE-79) in NukeViet CMS iframe srcdoc content

CVE-2026-94598

Received

Vulnerability type

Category:

Stored Cross-Site Scripting

CWE:

CWE-79

Impact:

Execution of attacker-controlled JavaScript in a viewer's browser with the site's origin

Severity:

HIGH RISK

(8.2)

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 has a stored cross-site scripting flaw in how it filters HTML in iframe srcdoc content. An attacker who can submit content that is later viewed may bypass the sanitizer and cause JavaScript to run in the viewer's session when the iframe is unsandboxed.

Affected context

The issue affects NukeViet CMS versions from 4.5.08 up to the fixed releases 4.5.12 and 4.6.02. It arises when HTML filtering processes an iframe srcdoc value containing entity-encoded square brackets: recursive filtering can decode them into internal sanitizer markers, which are later converted to markup without normal tag or attribute filtering.

The iframe tag is enabled by default through NV_ALLOWED_HTML_TAGS, and an unsandboxed srcdoc iframe shares the parent page's origin. Relevant content paths can include Contact messages, comments when the editor is enabled, and submitted articles.

Exploit preconditions

  • Attack surface: A NukeViet content submission or editing path that accepts iframe srcdoc content.
  • Required access: The ability to submit or modify content that will be stored; the description does not establish whether authentication is required.
  • Trigger point: A viewer loads the stored content containing the filtered iframe.
  • Why exploitation is possible: Recursive decoding can turn encoded characters into accepted internal sanitizer markers, which are later rendered as markup without normal tag or attribute filtering. An unsandboxed iframe can then execute script with the parent page's origin.

Why this happens

The sanitizer's recursive processing allows HTML-entity decoding to expose internal marker syntax after the input has passed through an earlier filtering stage. Later conversion of those markers to markup bypasses normal tag and attribute checks. This is a CWE-79 cross-site scripting weakness: untrusted content is not safely neutralized for its rendering context.

Potential impact

  • Attacker-controlled JavaScript may execute when a viewer opens the affected content.
  • A script could act with the viewer's site privileges and access session-reachable application functions.
  • Viewer data or actions may be exposed or manipulated, depending on application controls and the viewer's permissions.

General mitigation guidance

Defensive approaches focus on ensuring untrusted content remains data throughout parsing and rendering:

  • Use context-aware HTML sanitization that does not expose internal control markers to user input.
  • Canonicalize or decode input consistently before validation, and avoid repeated transformations that can reveal previously hidden syntax.
  • Apply strict allowlists for iframe attributes and content, and disable iframe support by default where it is not needed.
  • Use sandboxing and restrictive origin policies for embedded content as defense in depth.
  • Limit privileges available to user-submitted content and the actions exposed to authenticated sessions.

How teams detect issues like this

  • Use static analysis and code review to find recursive decoding or filtering paths, internal sanitizer markers exposed to user-controlled input, and later marker-to-markup conversions.
  • Review iframe srcdoc handling, HTML allowlists, and whether embedded frames are sandboxed.
  • Add security tests that verify entity-encoded input cannot become trusted markup after multiple processing stages.
  • Enforce policies that require context-aware output encoding and approved sanitization APIs. Automated code review tools may help identify suspicious parsing and rendering patterns.

Sources

SourceLink
github.comgithub.com/nukeviet/nukeviet/blob/4.5.13/CHANGELOG.txt
github.comgithub.com/nukeviet/nukeviet/commit/13d83ff45072730d10de89195da2154c896d6968
github.comgithub.com/nukeviet/nukeviet/commit/81a021a6557477efe5a4c713e21b883d138002e6
github.comgithub.com/nukeviet/nukeviet/releases/tag/4.6.02
github.comgithub.com/nukeviet/nukeviet/security/advisories/GHSA-p7cw-whjw-crcm
nukeviet.vnnukeviet.vn/vi/news/Tin-tuc/thong-bao-phat-hanh-nukeviet-4-6-02-858.html

Frequently asked

questions

The described issue can affect content submitted through application features and later viewed by another user. Whether an attacker can submit it remotely depends on the deployment's access controls and enabled content paths.

The attacker needs a way to submit or modify content that reaches the affected filtering and rendering flow. The vulnerability description does not specify whether that requires authentication.

Ensure untrusted input cannot become sanitizer control syntax, and sanitize HTML for its precise rendering context using strict tag and attribute allowlists.

Normalize input consistently before validation, avoid multi-stage transformations that can reveal hidden syntax, and disable or sandbox embedded content unless it is required.

Find out what's already
exploitable in your codebase.