NukeViet's SVG filter sees a different document than the browser
NukeViet's SVG filter sees a different document than the browser
NukeViet CMS patched a stored cross-site scripting issue that used an SVG document to bypass its upload sanitizer. The CVE is CVE-2026-94567. NukeViet's advisory says versions through 4.6.01 and 4.5.11 are affected, with fixes in 4.6.02 and 4.5.12. The weakness combines unrestricted file upload, an interpretation conflict, and stored XSS.
Two parsers, two meanings
The sanitizer loads an SVG without expanding internal entities. It then queries the DOM for elements and checks them against an allow-list. A script hidden inside an internal DTD entity appears to the sanitizer as an entity-reference node, not as a script element. The uploaded bytes therefore pass the check.
The browser takes a different path. When it opens the stored file as image/svg+xml, it expands the internal entity into a real script element. The script then runs in the CMS origin with the visitor's session. The flaw is an interpretation conflict: the filter and the browser reviewed different effective documents.
Upload permissions decide the reach
The advisory describes a particularly broad path when comment attachments accept SVG files from guests. It also notes that module administrators can reach the file manager, creating a privilege-escalation path to site administration. The exact deployment depends on upload settings, enabled comment features, and which roles can use them.
Site owners should inspect the configured extension groups, comment attachment settings, banner upload plans, and file-manager permissions. A site that does not allow public uploads still needs the update and a review of module-admin access. A site that accepts SVG from ordinary users has a more urgent exposure.
Fix the parser and the policy
The NukeViet fix rejects any SVG with a DOCTYPE, re-serializes the sanitized DOM before storage, and restores a raw-byte screen on the SVG path. Upgrade the CMS and the bundled vinades/nukeviet package to the fixed release. Verify the installed package version because a patched CMS tree can still vendor an older upload library.
If immediate update is impossible, remove svg from upload allow-lists used by the admin, comments, and banner plans. Serve user uploads with Content-Disposition: attachment where practical and apply a restrictive Content Security Policy. Those controls reduce execution, but they do not repair the server-side parser.
Investigation
Search the uploads directory for SVG files containing internal entity declarations or unexpected script content. Review uploads around the time that guest attachments were enabled. Preserve server logs, filenames, uploader accounts, and file hashes. If an administrator opened a suspicious SVG, review the administrator's session activity and rotate credentials.
Do not validate the flaw by sending a payload to a production site. A local copy of the application and a browser test are enough to confirm the behavior after the vendor update path is understood.