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.4 Node.js & npm CVE-2026-113654 GHSA-x3q4-9hxx-gx8m CVE-2026-113657 GHSA-374f-7chj-9948

sanitize-html before 2.18.0: three XSS bypass issues fixed in one release

Three separate cross-site scripting bypass issues in the sanitize-html npm package, used by ApostropheCMS and other Node.js applications, are fixed in version 2.18.0. All three require non-default sanitizer configurations and are rated low-to-medium severity.

By PatchBriefing · ·

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

AI summary

The sanitize-html npm package, which provides HTML sanitization for Node.js applications including ApostropheCMS, has received a single release (2.18.0) addressing three separate cross-site scripting (XSS) bypass issues. Each issue depends on specific non-default sanitizer configuration options being enabled, meaning the default configuration of sanitize-html is not affected by all three in the same way. This briefing covers all three advisories together since they share a root package and a common fix.

Three distinct sanitizer bypasses identified

Three separate vulnerabilities were identified in sanitize-html versions prior to 2.18.0: 1. CVE-2026-113654 (GHSA-x3q4-9hxx-gx8m): When a non-default `nonTextTags` configuration includes `noscript`, the discard region intended to strip its contents can end early when the underlying parser emits an implied ancestor close inside the `noscript` element. This can allow content intended to stay inert to survive sanitization and render in scripting-enabled browsers. The issue does not affect every default `nonTextTags` element. 2. CVE-2026-113657 (GHSA-374f-7chj-9948): In versions from 2.17.7 up to but not including 2.18.0, configurations that permit namespace-prefixed SVG animation elements and related URL-targeting attributes can bypass the SMIL URL protection, because prefixed tag names do not match the unprefixed animation-element check used by the sanitizer. This can let an attacker rewrite a link destination to an unsafe URI after the sanitized SVG is rendered; script execution requires a user to activate the affected link. 3. CVE-2026-113661 (GHSA-cv27-6wvh-8x7j): A non-default configuration that allows `meta` refresh elements along with their `http-equiv` and `content` attributes can retain unsafe script or redirect destinations embedded in the refresh content value, even after sanitization.

Root causes

All three issues stem from gaps in how sanitize-html models certain non-default configuration scenarios against the underlying HTML parser's behavior: an implied tag closure not matching the expected discard boundary (CVE-2026-113654), a namespace-prefixed tag name not matching an unprefixed check used for SMIL/SVG animation protection (CVE-2026-113657), and retained unsafe URI schemes within meta-refresh content attributes under a non-default configuration (CVE-2026-113661). Each requires the application to have explicitly enabled the relevant non-default options (such as including `noscript` in `nonTextTags`, allowing namespace-prefixed SVG animation elements, or allowing meta refresh elements).

Why it matters

These are cross-site scripting (XSS) sanitizer bypasses (CWE-79). If exploited, they could allow attacker-controlled content to execute script or redirect users to attacker-chosen destinations within an application that relies on sanitize-html to strip unsafe HTML. The practical risk depends heavily on which non-default configuration options an application has enabled; applications using sanitize-html's default configuration are not affected by all three issues in the same way.

Who is affected

Applications that depend on the sanitize-html npm package, including ApostropheCMS, are affected if they use a version prior to 2.18.0 and have enabled the specific non-default configuration options described above (non-default `nonTextTags` including `noscript`; namespace-prefixed SVG animation elements and related URL attributes; or `meta` refresh elements with `http-equiv`/`content` attributes). CVE-2026-113657 specifically affects versions from 2.17.7 up to but not including 2.18.0; the other two issues affect versions prior to 2.18.0 without a specified lower bound in the provided data.

Affected versions

sanitize-html: versions before 2.18.0 are affected by CVE-2026-113654 and CVE-2026-113661. sanitize-html: versions 2.17.7 up to but not including 2.18.0 are affected by CVE-2026-113657. All three issues are fixed in sanitize-html 2.18.0.

Fix available

All three issues are resolved in sanitize-html 2.18.0. Applications that use the affected non-default configuration options should update to this version.

Recommended action

Update the sanitize-html dependency to version 2.18.0 in any application, including ApostropheCMS deployments, that uses this package. If your configuration does not use `nonTextTags` with `noscript`, namespace-prefixed SVG animation elements, or `meta` refresh elements, exposure to these specific issues is reduced, but updating is still recommended since the fix addresses all three issues in one release. Review your sanitize-html configuration to confirm whether any of the affected non-default options are in use.

PatchBriefing score

5.4 / 10 · Medium

Official CVSS: 5.3

CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N

EPSS 0.0048 (34 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
vulnerable
sanitize-html ≥ 0 < 2.18.0
vulnerable
≥ 2.18.0
patched
sanitize-html >= 2.17.7, < 2.18.0
vulnerable
sanitize-html ≥ 2.17.7 < 2.18.0
vulnerable
≥ 2.18.0
patched
sanitize-html < 2.18.0
vulnerable
sanitize-html ≥ 0 < 2.18.0
vulnerable
≥ 2.18.0
patched

Reported fixes

All three issues are resolved in sanitize-html 2.18.0. Applications that use the affected non-default configuration options should update to this version.

How this was built

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

  • NVD (NIST) database
  • NVD (NIST) database
  • GitHub Advisory Database database
  • NVD (NIST) database
  • GitHub Advisory Database database
  • GitHub Advisory Database database
Unified report
sanitize-html before 2.18.0: three XSS bypass issues fixed in one release
1 article · 9 sources cited
Revision history
  1. Published
  2. Generated
  3. Published
  4. Generated
  5. Published
  6. 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