Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. sanitize-html
  4. ›
  5. CVE-2026-113650

CVE-2026-113650: ApostropheCMS sanitize-html: unbounded recursion when re-sanitizing the fallback of a discarded iframe (stack overflow, nestingLimit not enforced)

October 21, 2026

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:

  1. A few kilobytes of unclosed <iframe> tags throw RangeError: Maximum call stack size exceeded with the default options. Any application that sanitizes untrusted HTML with 2.18.0 can be made to throw on a small crafted input.
  2. nestingLimit is 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 →

Affected versions

All versions starting from 2.18.0 before 2.18.1

Fixed versions

  • 2.18.1

Solution

Upgrade to version 2.18.1 or above.

Impact 5.3 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

Learn more about CVSS

Weakness

  • CWE-674: Uncontrolled Recursion

Source file

npm/sanitize-html/CVE-2026-113650.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:16:57 +0000.