Skip to content
PatchBriefing

Search PatchBriefing

Type at least two characters. Results update as you type.

Search CVEs, products, packages and article titles.

Nothing found. Identifiers such as CVE and GHSA can be searched in both languages.

Subscribe

Medium · 5.3 Node.js & npm CVE-2026-113650 GHSA-c9rx-x947-fp3h

Uncontrolled Recursion in sanitize-html Allows Denial of Service (CVE-2026-113650)

sanitize-html 2.18.0 contains an unbounded recursion flaw when discarding disallowed <iframe> tags, which can cause a stack overflow and crash the application. The issue is fixed in version 2.18.1.

By PatchBriefing · ·

Produced automatically from official sources with the help of AI. How we work →

Synthesized by AI from 3 sources · updated 1 week ago

AI summary

A vulnerability has been identified in sanitize-html, a Node.js library used to clean HTML input, that can cause an application to crash under certain conditions. The flaw affects version 2.18.0 and has been fixed in version 2.18.1. The issue was documented as CVE-2026-113650.

What happened

sanitize-html version 2.18.0 contains a bug in how it handles disallowed <iframe> tags. By default, sanitize-html is configured with disallowedTagsMode set to 'discard', meaning disallowed tags are removed. When an <iframe> is encountered under this configuration, its raw-text content is re-sanitized by calling sanitizeHtml() again recursively. This recursive call has no limit and starts each nested invocation with a fresh internal state, which can lead to uncontrolled recursion.

Technical cause

The root cause is classified as CWE-674, Uncontrolled Recursion. Because the re-sanitization of iframe fallback content recurses without a bound and without carrying over state from the outer call, specially crafted nested HTML input can trigger excessive recursion depth, resulting in a stack overflow.

Why it matters

A stack overflow caused by this flaw can crash the Node.js process handling the sanitization, resulting in a denial of service for applications that rely on sanitize-html to process untrusted HTML input. The vulnerability does not affect confidentiality or integrity of data, only availability.

Who is affected

This issue is specifically relevant to projects using sanitize-html in its default configuration, where disallowedTagsMode is set to 'discard'. ApostropheCMS, a Node.js content management system that depends on sanitize-html, is noted as one project affected by this underlying dependency vulnerability.

Affected versions

sanitize-html version 2.18.0 is affected. The issue is fixed in version 2.18.1.

Fixes and mitigation

The vendor update that resolves this issue is version 2.18.1 of sanitize-html. Projects using version 2.18.0 should upgrade to this fixed version.

Recommended action

Upgrade sanitize-html to version 2.18.1 as soon as practical, particularly if your application processes untrusted or user-supplied HTML content, including HTML containing iframe tags. Applications built on ApostropheCMS or other software that depend on sanitize-html should verify their dependency version and update accordingly.

PatchBriefing score

5.3 / 10 · Medium

Official CVSS: 5.3

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

EPSS 0.0052 (38 percentile)

Why this score

The PatchBriefing score equals the official CVSS score; when this article covers several vulnerabilities, the highest one. Signals such as known exploitation and EPSS are listed separately and do not change the score.

Affected versions

sanitize-html >= 2.18.0, < 2.18.1
vulnerable
sanitize-html ≥ 2.18.0 < 2.18.1
vulnerable
≥ 2.18.1
patched

Reported fixes

The vendor update that resolves this issue is version 2.18.1 of sanitize-html. Projects using version 2.18.0 should upgrade to this fixed version.

How this was built

3 source records were collected, matched and used to prepare the report above.

  • NVD (NIST) database
  • GitHub Advisory Database database
  • OSV.dev database
Unified report
Uncontrolled Recursion in sanitize-html Allows Denial of Service (CVE-2026-113650)
1 article · 3 sources cited
Revision history
  1. Published
  2. Generated
  3. Published
  4. Generated
The Morning Brief

Relevant changes for the stacks you follow.

Choose your stacks, topics and optional WordPress plugins. At 07:00 CET, matching advisories and releases from the reporting period are grouped into one email.

✓ Choose stacks and topics✓ Change preferences anytime✓ One grouped email