Description
Since 2.18.0, when an <iframe> is not allowed and disallowedTagsMode is 'discard' (the defaults), its raw-text content is re-sanitized by a recursive call to sanitizeHtml(text, options) (the change from #5564, fixing #5550). The recursion has no bound and starts each nested call with a fresh state. Two consequences, both absent from 2.17.
Recommendation
Update the sanitize-html package to the latest compatible version. Followings are version details:
- Affected version(s): >= 2.18.0, < 2.18.1
- Patched version(s): 2.18.1
References
Could your website be exposed too?
SmartScanner can check your website for ApostropheCMS sanitize-html: unbounded recursion when re-sanitizing the fallback of a discarded iframe (stack overflow, and gives you actionable findings to investigate.
Start a free scanRelated Issues
- ApostropheCMS sanitize-html: nonTextTags discard region ends early on an implied close, letting <noscript> content rende - CVE-2026-113654
- ApostropheCMS sanitize-html: SMIL animation namespace-prefix bypass allows javascript: URI injection (XSS) - CVE-2026-113657
- Apostrophe has default XSS via `xmp` raw-text passthrough in `sanitize-html` - CVE-2026-44990
- Happy DOM: SSRF via iframe and link stylesheet when parsing untrusted HTML - CVE-2026-118660


