Home/Research/Post

GHSA-cp55-wmv6-wxpp: NukeViet CMS: Stored XSS via internal DTD entities in SVG uploads

  • Severity: CRITICAL
  • CVE: CVE-2026-94567
  • Ecosystems: composer, composer
  • Packages: nukeviet/nukeviet, nukeviet/nukeviet

### Impact

This is a **stored cross-site scripting (XSS)** vulnerability. An uploaded SVG can carry a `”>
]>

&payload;

“`

1. Upload the file through the admin file manager (`POST /admin/index.php?nv=upload&op=upload`, `type=image`) as any module admin, or via a front-end comment/banner attachment where enabled. It is accepted and stored unchanged.
2. Control test: the identical script written as a plain “ element is rejected – proving the entity, not “SVG scripts are allowed”, is the bypass.
3. Open `/uploads/.svg` directly in a browser: the internal entity expands into a real “ element and executes in the site’s origin (confirmed reading `document.domain`).

### Patches

Yes. Fixed in commit `b4abcddd3` on the `nukeviet4.6` branch; the change is listed in `CHANGELOG.txt` under NukeViet 4.6.02. Users should update to the release that contains this commit (NukeViet 4.6.02 or later). Because the vulnerable code lives in the `vinades/nukeviet` Composer package, sites that vendor it should also update the package, not only the CMS tree.

The fix, all inside `check_svg_tmpfile()`:

1. Reject any SVG that declares a `DOCTYPE` (`$dom->doctype !== null`). SVGs used as site assets have no legitimate need for an internal DTD subset; this removes the ability to declare entities at all and also blocks XXE.
2. Re-serialise the sanitised DOM back to disk (`saveXML()` + `file_put_contents()`), so what is stored equals what was validated (no smuggling via comments, CDATA, or trailing…

Source: GitHub Security Advisories · 2026-11-30