CVE-2026-113650: ApostropheCMS sanitize-html: unbounded recursion when re-sanitizing the fallback of a discarded iframe (stack overflow, nestingLimit not enforced)
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.7 and 2.17.4:
- A few kilobytes of unclosed
<iframe>tags throwRangeError: Maximum call stack size exceededwith the default options. Any application that sanitizes untrusted HTML with 2.18.0 can be made to throw on a small crafted input. nestingLimitis not enforced across a discarded iframe: each nested iframe restarts the depth count at zero, so the output can be nested arbitrarily deep regardless of the configured limit.
References
- github.com/advisories/GHSA-c9rx-x947-fp3h
- github.com/apostrophecms/apostrophe/commit/06e4b377f3c360f9e89c32dccd7e505ad5ddf498
- github.com/apostrophecms/apostrophe/commit/40b989b1a9dd23d30029b8ce7668634265cfe5ea
- github.com/apostrophecms/apostrophe/releases/tag/sanitize-html@2.18.1
- github.com/apostrophecms/apostrophe/security/advisories/GHSA-c9rx-x947-fp3h
- nvd.nist.gov/vuln/detail/CVE-2026-113650
Code Behaviors & Features
Detect and mitigate CVE-2026-113650 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →