Description
Commit 49d0bb7 introduced a regression in sanitize-html that bypasses allowedTags enforcement for text inside nonTextTagsArray elements (textarea and option). Entity-encoded HTML inside these elements passes through the sanitizer as decoded, unescaped HTML, allowing injection of arbitrary tags including XSS payloads.
Recommendation
Update the sanitize-html package to the latest compatible version. Followings are version details:
- Affected version(s): >= 2.17.2, < 2.17.3
- Patched version(s): 2.17.3
References
Could your website be exposed too?
SmartScanner can check your website for sanitize-html allowedTags Bypass via Entity-Decoded Text in nonTextTags Elements and gives you actionable findings to investigate.
Start a free scanRelated Issues
- Apostrophe has default XSS via `xmp` raw-text passthrough in `sanitize-html` - CVE-2026-44990
- ApostropheCMS sanitize-html: nonTextTags discard region ends early on an implied close, letting <noscript> content rende - CVE-2026-113654
- ApostropheCMS: Mutation-XSS / allowedTags bypass via literal `</textarea/>` solidus close - CVE-2026-63670
- ApostropheCMS sanitize-html: SMIL animation namespace-prefix bypass allows javascript: URI injection (XSS) - CVE-2026-113657


