Every CVESearch/Get API key

CVE-2026-65914

DOMPurify before 3.3.2 Mutation XSS via Re-Contextualization

5.3 MediumFix available

CVE-2026-65914 is a medium vulnerability (CVSS 5.3) in Cure53 Dompurify, published June 5, 2019. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.31%, the 23rd percentile. Fixed in handlebars 3.0.8.

Severity
5.3 MediumCVSS 4.0, CVE List
Exploit chance
0.31%EPSS, 23rd percentile
Exploitation
None knownNot on CISA’s or ENISA’s lists
Fixed in
3.0.8handlebars +52 more

Description

DOMPurify before 3.3.2 contains a mutation-XSS vulnerability when sanitized HTML is reinserted into special parsing contexts using innerHTML with wrappers like script, xmp, iframe, noembed, noframes, or noscript. Attackers can craft payloads with closing sequences that break out of the wrapper context during reparsing, reactivating dangerous markup with event handlers to execute JavaScript.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
Passive

What an attacker can affect

Confidentiality
None
Integrity
None
Availability
None

Exploit likelihood

0.31%Unchanged since Jul 24, 2026
90%50%10%1%

Affected products

Affected packages

Affected packages
PackageAffectedFixed
handlebars
npm
before 3.0.8
3.0.8
handlebars
npm
4.0.0 up to 4.5.2
4.5.2
handlebars
npm
4.0.0 up to 4.5.3
4.5.3
dompurify
npm
before 3.3.2
3.3.2
handlebars
npm
4.1.0 up to 4.1.2
4.1.2
handlebars
npm
4.0.0 up to 4.0.14
4.0.14
handlebars
npm
before 3.0.7
3.0.7
handlebars
TuxCare:npm
1.3.0-tuxcare.0 up to 1.3.0-tuxcare.1, plus listed versions
1.3.0
1.3.0-tuxcare.1
handlebars
TuxCare:npm
1.0.12-tuxcare.0 up to 1.0.12-tuxcare.2, plus listed versions
1.0.121.0.12-tuxcare.1
1.0.12-tuxcare.2
dompurify
TuxCare:npm
From an advisory covering 2 CVEs
2.5.8-tuxcare.0 up to 2.5.8-tuxcare.2, plus listed versions
2.5.82.5.8-tuxcare.1
2.5.8-tuxcare.2
Show 43 moreShow less
Affected packages
PackageAffectedFixed
dompurify
TuxCare:npm
From an advisory covering 2 CVEs
3.1.6-tuxcare.0 up to 3.1.6-tuxcare.2, plus listed versions
3.1.63.1.6-tuxcare.1
3.1.6-tuxcare.2
dompurify
TuxCare:npm
From an advisory covering 6 CVEs
3.2.3-tuxcare.0 up to 3.2.3-tuxcare.1, plus listed versions
3.2.3
3.2.3-tuxcare.1
dompurify
TuxCare:npm
From an advisory covering 6 CVEs
3.0.3-tuxcare.0 up to 3.0.3-tuxcare.1, plus listed versions
3.0.3
3.0.3-tuxcare.1
dompurify
TuxCare:npm
From an advisory covering 5 CVEs
2.4.0-tuxcare.0 up to 2.4.0-tuxcare.1, plus listed versions
2.4.0
2.4.0-tuxcare.1
dompurify
TuxCare:npm
From an advisory covering 5 CVEs
2.4.7-tuxcare.0 up to 2.4.7-tuxcare.1, plus listed versions
2.4.7
2.4.7-tuxcare.1
dompurify
TuxCare:npm
2.4.3-tuxcare.0 up to 2.4.3-tuxcare.2, plus listed versions
2.4.32.4.3-tuxcare.1
2.4.3-tuxcare.2
dompurify
TuxCare:npm
From an advisory covering 9 CVEs
3.2.3-tuxcare.0 up to 3.2.3-tuxcare.3, plus listed versions
3.2.33.2.3-tuxcare.13.2.3-tuxcare.2
3.2.3-tuxcare.3
dompurify
TuxCare:npm
From an advisory covering 8 CVEs
3.2.7-tuxcare.0 up to 3.2.7-tuxcare.1, plus listed versions
3.2.7
3.2.7-tuxcare.1
dompurify
TuxCare:npm
From an advisory covering 10 CVEs
2.3.0-tuxcare.0 up to 2.3.0-tuxcare.5, plus listed versions
2.3.02.3.0-tuxcare.12.3.0-tuxcare.22.3.0-tuxcare.32.3.0-tuxcare.4
2.3.0-tuxcare.5
dompurify
TuxCare:npm
From an advisory covering 11 CVEs
3.0.3-tuxcare.0 up to 3.0.3-tuxcare.5, plus listed versions
3.0.33.0.3-tuxcare.13.0.3-tuxcare.23.0.3-tuxcare.33.0.3-tuxcare.4
3.0.3-tuxcare.5
dompurify
TuxCare:npm
From an advisory covering 11 CVEs
2.4.3-tuxcare.0 up to 2.4.3-tuxcare.8, plus listed versions
2.4.32.4.3-tuxcare.12.4.3-tuxcare.22.4.3-tuxcare.32.4.3-tuxcare.42.4.3-tuxcare.52.4.3-tuxcare.62.4.3-tuxcare.7
2.4.3-tuxcare.8
dompurify
TuxCare:npm
From an advisory covering 12 CVEs
3.1.3-tuxcare.0 up to 3.1.3-tuxcare.2, plus listed versions
3.1.33.1.3-tuxcare.1
3.1.3-tuxcare.2
dompurify
TuxCare:npm
From an advisory covering 5 CVEs
2.3.3-tuxcare.0 up to 2.3.3-tuxcare.2, plus listed versions
2.3.32.3.3-tuxcare.1
2.3.3-tuxcare.2
dompurify
TuxCare:npm
From an advisory covering 11 CVEs
3.1.4-tuxcare.0 up to 3.1.4-tuxcare.2, plus listed versions
3.1.43.1.4-tuxcare.1
3.1.4-tuxcare.2
dompurify
TuxCare:npm
From an advisory covering 9 CVEs
3.0.2-tuxcare.0 up to 3.0.2-tuxcare.2, plus listed versions
3.0.23.0.2-tuxcare.1
3.0.2-tuxcare.2
dompurify
TuxCare:npm
From an advisory covering 10 CVEs
3.0.9-tuxcare.0 up to 3.0.9-tuxcare.2, plus listed versions
3.0.93.0.9-tuxcare.1
3.0.9-tuxcare.2
dompurify
TuxCare:npm
From an advisory covering 11 CVEs
3.0.8-tuxcare.0 up to 3.0.8-tuxcare.2, plus listed versions
3.0.83.0.8-tuxcare.1
3.0.8-tuxcare.2
dompurify
TuxCare:npm
From an advisory covering 10 CVEs
3.0.1-tuxcare.0 up to 3.0.1-tuxcare.2, plus listed versions
3.0.13.0.1-tuxcare.1
3.0.1-tuxcare.2
dompurify
TuxCare:npm
From an advisory covering 13 CVEs
3.1.0-tuxcare.0 up to 3.1.0-tuxcare.2, plus listed versions
3.1.03.1.0-tuxcare.1
3.1.0-tuxcare.2
dompurify
TuxCare:npm
From an advisory covering 12 CVEs
3.0.11-tuxcare.0 up to 3.0.11-tuxcare.2, plus listed versions
3.0.113.0.11-tuxcare.1
3.0.11-tuxcare.2
dompurify
TuxCare:npm
From an advisory covering 8 CVEs
3.1.1-tuxcare.0 up to 3.1.1-tuxcare.2, plus listed versions
3.1.13.1.1-tuxcare.1
3.1.1-tuxcare.2
dompurify
TuxCare:npm
From an advisory covering 10 CVEs
3.2.6-tuxcare.0 up to 3.2.6-tuxcare.2, plus listed versions
3.2.63.2.6-tuxcare.1
3.2.6-tuxcare.2
dompurify
TuxCare:npm
From an advisory covering 6 CVEs
3.0.6-tuxcare.0 up to 3.0.6-tuxcare.3, plus listed versions
3.0.63.0.6-tuxcare.13.0.6-tuxcare.2
3.0.6-tuxcare.3
dompurify
TuxCare:npm
From an advisory covering 10 CVEs
2.0.8-tuxcare.0 up to 2.0.8-tuxcare.3, plus listed versions
2.0.82.0.8-tuxcare.12.0.8-tuxcare.2
2.0.8-tuxcare.3
dompurify
TuxCare:npm
From an advisory covering 13 CVEs
2.3.10-tuxcare.0 up to 2.3.10-tuxcare.3, plus listed versions
2.3.102.3.10-tuxcare.12.3.10-tuxcare.2
2.3.10-tuxcare.3
dompurify
TuxCare:npm
From an advisory covering 5 CVEs
3.0.5-tuxcare.0 up to 3.0.5-tuxcare.2, plus listed versions
3.0.53.0.5-tuxcare.1
3.0.5-tuxcare.2
dompurify
TuxCare:npm
From an advisory covering 5 CVEs
3.0.4-tuxcare.0 up to 3.0.4-tuxcare.2, plus listed versions
3.0.43.0.4-tuxcare.1
3.0.4-tuxcare.2
dompurify
TuxCare:npm
From an advisory covering 10 CVEs
3.1.2-tuxcare.0 up to 3.1.2-tuxcare.3, plus listed versions
3.1.23.1.2-tuxcare.13.1.2-tuxcare.2
3.1.2-tuxcare.3
dompurify
TuxCare:npm
From an advisory covering 2 CVEs
2.4.0-tuxcare.0 up to 2.4.0-tuxcare.8, plus listed versions
2.4.02.4.0-tuxcare.12.4.0-tuxcare.22.4.0-tuxcare.32.4.0-tuxcare.42.4.0-tuxcare.52.4.0-tuxcare.62.4.0-tuxcare.7
2.4.0-tuxcare.8
node-dompurify
Debian:12
All versions, plus listed versions
2.4.1+dfsg+~2.4.0-12.4.1+dfsg+~2.4.0-22.4.1+dfsg+~2.4.0-2+deb12u13.0.9+dfsg+~3.0.5-13.1.6+dfsg+~3.0.5-1
Show 13 moreShow less
3.1.7+dfsg+~3.0.5-13.1.7+dfsg+~3.0.5-23.2.5+dfsg-13.3.2+dfsg-13.3.3+dfsg-13.3.3+dfsg-23.4.1+dfsg-13.4.12+dfsg-13.4.13+dfsg-13.4.13+dfsg-23.4.16+dfsg-13.4.2+dfsg-13.4.5+dfsg-1
None known
node-dompurify
Debian:13
All versions, plus listed versions
3.1.7+dfsg+~3.0.5-23.2.5+dfsg-13.3.2+dfsg-13.3.3+dfsg-13.3.3+dfsg-2
Show 7 moreShow less
3.4.1+dfsg-13.4.12+dfsg-13.4.13+dfsg-13.4.13+dfsg-23.4.16+dfsg-13.4.2+dfsg-13.4.5+dfsg-1
None known
node-dompurify
Debian:14
before 3.3.2+dfsg-1, plus listed versions
3.1.7+dfsg+~3.0.5-23.2.5+dfsg-1
3.3.2+dfsg-1
grafana13.1
Red Hat:hummingbird:1
From an advisory covering 9 CVEs
before 0:13.1.3-0.1.1.hum1
0:13.1.3-0.1.1.hum1
grafana12.4
Red Hat:hummingbird:1
From an advisory covering 8 CVEs
before 0:12.4.8-0.1.2.hum1
0:12.4.8-0.1.2.hum1
handlebars
Root:npm
before 3.0.7-aikido.3
3.0.7-aikido.33.0.3-aikido.23.0.8-aikido.13.0.8-aikido.2
@rootio/handlebars
Root:npm
before 3.0.7-root.io.3
3.0.7-root.io.33.0.3-root.io.23.0.8-root.io.13.0.8-root.io.2
dompurify
Root:npm
before 2.5.8-aikido.3
2.5.8-aikido.32.5.9-aikido.13.2.4-aikido.12.5.8-aikido.12.5.9-aikido.23.2.4-aikido.22.5.9-aikido.33.2.4-aikido.32.5.8-aikido.22.5.9-aikido.43.2.4-aikido.42.5.9-aikido.53.2.4-aikido.5
@rootio/dompurify
Root:npm
before 2.5.8-root.io.3
2.5.8-root.io.32.5.9-root.io.13.2.4-root.io.12.5.8-root.io.12.5.9-root.io.23.2.4-root.io.22.5.9-root.io.33.2.4-root.io.32.5.8-root.io.22.5.9-root.io.43.2.4-root.io.42.5.9-root.io.53.2.4-root.io.5
handlebars
Root:npm
before 3.0.3-aikido.2
3.0.3-aikido.23.0.7-aikido.13.0.7-aikido.23.0.7-aikido.3
@rootio/handlebars
Root:npm
before 3.0.3-root.io.2
3.0.3-root.io.23.0.7-root.io.13.0.7-root.io.23.0.7-root.io.3
node-dompurify
Ubuntu:22.04:LTS
All versions, plus listed versions
2.3.0+dfsg-22.3.3+dfsg-1
None known
node-dompurify
Ubuntu:24.04:LTS
All versions, plus listed versions
2.4.1+dfsg+~2.4.0-13.0.9+dfsg+~3.0.5-1
None known
velociraptor
openSUSE:Tumbleweed
From an advisory covering 40 CVEs
before 0.76.7.0.git145.b60ef1146-1.1
0.76.7.0.git145.b60ef1146-1.1

What each source reports

CVE List Score used5.3

DOMPurify before 3.3.2 Mutation XSS via Re-Contextualization

DOMPurify before 3.3.2 contains a mutation-XSS vulnerability when sanitized HTML is reinserted into special parsing contexts using innerHTML with wrappers like script, xmp, iframe, noembed, noframes, or noscript. Attackers can craft payloads with closing sequences that break out of the wrapper context during reparsing, reactivating dangerous markup with event handlers to execute JavaScript.

Record
CVE-2026-65914
CVSS 4.0
5.3 MediumCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
Weakness
CWE-79
Updated
2026-11-02
EUVDEUVD-2026-482775.3

DOMPurify before 3.3.2 contains a mutation-XSS vulnerability when sanitized HTML is reinserted into special parsing contexts using innerHTML with wrappers like script, xmp, iframe, noembed, noframes, or noscript. Attackers can craft payloads with closing sequences that break out of the wrapper context during reparsing, reactivating dangerous markup with event handlers to execute JavaScript.

Record
EUVD-2026-48277
CVSS 4.0
5.3 MediumCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
Updated
2026-11-02
GitHub AdvisoriesGHSA-2cf5-4w76-r9qv7.3

Arbitrary Code Execution in handlebars

Versions of handlebars prior to 3.0.8 or 4.5.2 are vulnerable to Arbitrary Code Execution. The package's lookup helper fails to properly validate templates, allowing attackers to submit templates that execute arbitrary JavaScript in the system. It can be used to run arbitrary code in a server processing Handlebars templates or on a victim's browser (effectively serving as Cross-Site Scripting).

The following template can be used to demonstrate the vulnerability:

	{{#with split as |a|}}
		{{pop (push "alert('Vulnerable Handlebars JS');")}}
		{{#with (concat (lookup join (slice 0 1)))}}
			{{#each (slice 2 3)}}
				{{#with (apply 0 a)}}
					{{.}}
				{{/with}}
			{{/each}}
		{{/with}}
	{{/with}}
{{/with}}```


## Recommendation

Upgrade to version 3.0.8, 4.5.2 or later.
Record
GHSA-2cf5-4w76-r9qv
CVSS 3.1
7.3 HighCVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:L/I:H/A:L
Weakness
CWE-94
Updated
2026-11-02
GitHub AdvisoriesGHSA-h8r8-wccr-v5f26.9

DOMPurify is vulnerable to mutation-XSS via Re-Contextualization

Description

A mutation-XSS (mXSS) condition was confirmed when sanitized HTML is reinserted into a new parsing context using innerHTML and special wrappers. The vulnerable wrappers confirmed in browser behavior are script, xmp, iframe, noembed, noframes, and noscript. The payload remains seemingly benign after DOMPurify.sanitize(), but mutates during the second parse into executable markup with an event handler, enabling JavaScript execution in the client (alert(1) in the PoC).

Vulnerability

The root cause is context switching after sanitization: sanitized output is treated as trusted and concatenated into a wrapper string (for example, <xmp> ... </xmp> or other special wrappers) before being reparsed by the browser. In this flow, attacker-controlled text inside an attribute (for example </xmp> or equivalent closing sequences for each wrapper) closes the special parsing context early and reintroduces attacker markup (<img ... onerror=...>) outside the original attribute context. DOMPurify sanitizes the original parse tree, but the application performs a second parse in a different context, reactivating dangerous tokens (classic mXSS pattern).

PoC

  1. Start the PoC app:
npm install
npm start
  1. Open http://localhost:3001.
  2. Set Wrapper en sink to xmp.
  3. Use payload:
 <img src=x alt="</xmp><img src=x onerror=alert('expoc')>">
  1. Click Sanitize + Render.
  2. Observe:
  • Sanitized response still contains the </xmp> sequence inside alt.
  • The sink reparses to include <img src="x" onerror="alert('expoc')">.
  • alert('expoc') is triggered.
  1. Files:
  • index.html
<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>expoc - DOMPurify SSR PoC</title>
    <style>
      :root {
        --bg: #f7f8fb;
        --panel: #ffffff;
        --line: #d8dce6;
        --text: #0f172a;
        --muted: #475569;
        --accent: #0ea5e9;
      }

      * {
        box-sizing: border-box;
      }

      body {
        margin: 0;
        font-family: "SF Mono", Menlo, Consolas, monospace;
        color: var(--text);
        background: radial-gradient(circle at 10% 0%, #e0f2fe 0%, var(--bg) 60%);
      }

      main {
        max-width: 980px;
        margin: 28px auto;
        padding: 0 16px 20px;
      }

      h1 {
        margin: 0 0 10px;
        font-size: 1.45rem;
      }

      p {
        margin: 0;
        color: var(--muted);
      }

      .grid {
        display: grid;
        gap: 14px;
        margin-top: 16px;
      }

      .card {
        background: var(--panel);
        border: 1px solid var(--line);
        border-radius: 12px;
        padding: 14px;
      }

      label {
        display: block;
        margin-bottom: 7px;
        font-size: 0.85rem;
        color: var(--muted);
      }

      textarea,
      input,
      select,
      button {
        width: 100%;
        border: 1px solid var(--line);
        border-radius: 8px;
        padding: 9px 10px;
        font: inherit;
        background: #fff;
      }

      textarea {
        min-height: 110px;
        resize: vertical;
      }

      .row {
        display: grid;
        grid-template-columns: 1fr 230px;
        gap: 12px;
      }

      button {
        cursor: pointer;
        background: var(--accent);
        color: #fff;
        border-color: #0284c7;
      }

      #sink {
        min-height: 90px;
        border: 1px dashed #94a3b8;
        border-radius: 8px;
        padding: 10px;
        background: #f8fafc;
      }

      pre {
        margin: 0;
        white-space: pre-wrap;
        word-break: break-word;
      }

      .note {
        margin-top: 8px;
        font-size: 0.85rem;
      }

      .status-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 8px;
        margin-top: 10px;
      }

     …
Record
GHSA-h8r8-wccr-v5f2
CVSS 4.0
6.9 MediumCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
Weakness
CWE-79
Updated
2026-11-02
GitHub AdvisoriesGHSA-q42p-pg8m-cqh67.3

Prototype Pollution in handlebars

Versions of handlebars prior to 4.0.14 are vulnerable to Prototype Pollution. Templates may alter an Objects' prototype, thus allowing an attacker to execute arbitrary code on the server.

Recommendation

For handlebars 4.1.x upgrade to 4.1.2 or later. For handlebars 4.0.x upgrade to 4.0.14 or later.

Record
GHSA-q42p-pg8m-cqh6
CVSS 3.1
7.3 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
Weakness
CWE-471
Updated
2026-11-02
GitHub AdvisoriesGHSA-g9r4-xpmj-mj65No score

Prototype Pollution in handlebars

Versions of handlebars prior to 3.0.8 or 4.5.3 are vulnerable to prototype pollution. It is possible to add or modify properties to the Object prototype through a malicious template. This may allow attackers to crash the application or execute Arbitrary Code in specific conditions.

Recommendation

Upgrade to version 3.0.8, 4.5.3 or later.

Record
GHSA-g9r4-xpmj-mj65
Weakness
CWE-1321
Updated
2026-11-02
Show 52 moreShow less
GitHub AdvisoriesGHSA-q2c6-c6pm-g3ghNo score

Arbitrary Code Execution in handlebars

Versions of handlebars prior to 3.0.8 or 4.5.3 are vulnerable to Arbitrary Code Execution. The package's lookup helper fails to properly validate templates, allowing attackers to submit templates that execute arbitrary JavaScript in the system. It is due to an incomplete fix for a previous issue. This vulnerability can be used to run arbitrary code in a server processing Handlebars templates or on a victim's browser (effectively serving as Cross-Site Scripting).

Recommendation

Upgrade to version 3.0.8, 4.5.3 or later.

Record
GHSA-q2c6-c6pm-g3gh
Updated
2026-11-02
NVD5.3

DOMPurify before 3.3.2 contains a mutation-XSS vulnerability when sanitized HTML is reinserted into special parsing contexts using innerHTML with wrappers like script, xmp, iframe, noembed, noframes, or noscript. Attackers can craft payloads with closing sequences that break out of the wrapper context during reparsing, reactivating dangerous markup with event handlers to execute JavaScript.

Record
CVE-2026-65914
CVSS 4.0
5.3 MediumCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Weakness
CWE-79
Updated
2026-11-02
OSV5.3

DOMPurify before 3.3.2 Mutation XSS via Re-Contextualization

DOMPurify before 3.3.2 contains a mutation-XSS vulnerability when sanitized HTML is reinserted into special parsing contexts using innerHTML with wrappers like script, xmp, iframe, noembed, noframes, or noscript. Attackers can craft payloads with closing sequences that break out of the wrapper context during reparsing, reactivating dangerous markup with event handlers to execute JavaScript.

Record
CVE-2026-65914
CVSS 4.0
5.3 MediumCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
Weakness
CWE-79
Updated
2026-11-02
OSVDEBIAN-CVE-2026-659146.1

DOMPurify before 3.3.2 contains a mutation-XSS vulnerability when sanitized HTML is reinserted into special parsing contexts using innerHTML with wrappers like script, xmp, iframe, noembed, noframes, or noscript. Attackers can craft payloads with closing sequences that break out of the wrapper context during reparsing, reactivating dangerous markup with event handlers to execute JavaScript.

Record
DEBIAN-CVE-2026-65914
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Updated
2026-11-02
OSVGHSA-2cf5-4w76-r9qv7.3

Arbitrary Code Execution in handlebars

Versions of handlebars prior to 3.0.8 or 4.5.2 are vulnerable to Arbitrary Code Execution. The package's lookup helper fails to properly validate templates, allowing attackers to submit templates that execute arbitrary JavaScript in the system. It can be used to run arbitrary code in a server processing Handlebars templates or on a victim's browser (effectively serving as Cross-Site Scripting).

The following template can be used to demonstrate the vulnerability:

	{{#with split as |a|}}
		{{pop (push "alert('Vulnerable Handlebars JS');")}}
		{{#with (concat (lookup join (slice 0 1)))}}
			{{#each (slice 2 3)}}
				{{#with (apply 0 a)}}
					{{.}}
				{{/with}}
			{{/each}}
		{{/with}}
	{{/with}}
{{/with}}```


## Recommendation

Upgrade to version 3.0.8, 4.5.2 or later.
Record
GHSA-2cf5-4w76-r9qv
CVSS 3.1
7.3 HighCVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:L/I:H/A:L
Weakness
CWE-94
Updated
2026-11-02
OSVGHSA-h8r8-wccr-v5f26.9

DOMPurify is vulnerable to mutation-XSS via Re-Contextualization

Description

A mutation-XSS (mXSS) condition was confirmed when sanitized HTML is reinserted into a new parsing context using innerHTML and special wrappers. The vulnerable wrappers confirmed in browser behavior are script, xmp, iframe, noembed, noframes, and noscript. The payload remains seemingly benign after DOMPurify.sanitize(), but mutates during the second parse into executable markup with an event handler, enabling JavaScript execution in the client (alert(1) in the PoC).

Vulnerability

The root cause is context switching after sanitization: sanitized output is treated as trusted and concatenated into a wrapper string (for example, <xmp> ... </xmp> or other special wrappers) before being reparsed by the browser. In this flow, attacker-controlled text inside an attribute (for example </xmp> or equivalent closing sequences for each wrapper) closes the special parsing context early and reintroduces attacker markup (<img ... onerror=...>) outside the original attribute context. DOMPurify sanitizes the original parse tree, but the application performs a second parse in a different context, reactivating dangerous tokens (classic mXSS pattern).

PoC

  1. Start the PoC app:
npm install
npm start
  1. Open http://localhost:3001.
  2. Set Wrapper en sink to xmp.
  3. Use payload:
 <img src=x alt="</xmp><img src=x onerror=alert('expoc')>">
  1. Click Sanitize + Render.
  2. Observe:
  • Sanitized response still contains the </xmp> sequence inside alt.
  • The sink reparses to include <img src="x" onerror="alert('expoc')">.
  • alert('expoc') is triggered.
  1. Files:
  • index.html
<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>expoc - DOMPurify SSR PoC</title>
    <style>
      :root {
        --bg: #f7f8fb;
        --panel: #ffffff;
        --line: #d8dce6;
        --text: #0f172a;
        --muted: #475569;
        --accent: #0ea5e9;
      }

      * {
        box-sizing: border-box;
      }

      body {
        margin: 0;
        font-family: "SF Mono", Menlo, Consolas, monospace;
        color: var(--text);
        background: radial-gradient(circle at 10% 0%, #e0f2fe 0%, var(--bg) 60%);
      }

      main {
        max-width: 980px;
        margin: 28px auto;
        padding: 0 16px 20px;
      }

      h1 {
        margin: 0 0 10px;
        font-size: 1.45rem;
      }

      p {
        margin: 0;
        color: var(--muted);
      }

      .grid {
        display: grid;
        gap: 14px;
        margin-top: 16px;
      }

      .card {
        background: var(--panel);
        border: 1px solid var(--line);
        border-radius: 12px;
        padding: 14px;
      }

      label {
        display: block;
        margin-bottom: 7px;
        font-size: 0.85rem;
        color: var(--muted);
      }

      textarea,
      input,
      select,
      button {
        width: 100%;
        border: 1px solid var(--line);
        border-radius: 8px;
        padding: 9px 10px;
        font: inherit;
        background: #fff;
      }

      textarea {
        min-height: 110px;
        resize: vertical;
      }

      .row {
        display: grid;
        grid-template-columns: 1fr 230px;
        gap: 12px;
      }

      button {
        cursor: pointer;
        background: var(--accent);
        color: #fff;
        border-color: #0284c7;
      }

      #sink {
        min-height: 90px;
        border: 1px dashed #94a3b8;
        border-radius: 8px;
        padding: 10px;
        background: #f8fafc;
      }

      pre {
        margin: 0;
        white-space: pre-wrap;
        word-break: break-word;
      }

      .note {
        margin-top: 8px;
        font-size: 0.85rem;
      }

      .status-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 8px;
        margin-top: 10px;
      }

     …
Record
GHSA-h8r8-wccr-v5f2
CVSS 4.0
6.9 MediumCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
Weakness
CWE-79
Updated
2026-11-02
OSVGHSA-q42p-pg8m-cqh67.3

Prototype Pollution in handlebars

Versions of handlebars prior to 4.0.14 are vulnerable to Prototype Pollution. Templates may alter an Objects' prototype, thus allowing an attacker to execute arbitrary code on the server.

Recommendation

For handlebars 4.1.x upgrade to 4.1.2 or later. For handlebars 4.0.x upgrade to 4.0.14 or later.

Record
GHSA-q42p-pg8m-cqh6
CVSS 3.1
7.3 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
Weakness
CWE-471
Updated
2026-11-02
OSVRHSA-2026:545177.5

Red Hat Security Advisory: Red Hat Hardened Images RPMs Security Update

Record
RHSA-2026:54517
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-13
OSVRHSA-2026:585006.1

Red Hat Security Advisory: Red Hat Hardened Images RPMs Security Update

Record
RHSA-2026:58500
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Updated
2026-11-13
OSVUBUNTU-CVE-2026-659145.3

DOMPurify before 3.3.2 contains a mutation-XSS vulnerability when sanitized HTML is reinserted into special parsing contexts using innerHTML with wrappers like script, xmp, iframe, noembed, noframes, or noscript. Attackers can craft payloads with closing sequences that break out of the wrapper context during reparsing, reactivating dangerous markup with event handlers to execute JavaScript.

Record
UBUNTU-CVE-2026-65914
CVSS 4.0
5.3 MediumCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Updated
2026-11-02
OSVCLSA-2026-1774743817No score

TuxCare security update for handlebars (1 CVE)

TuxCare rebuilt handlebars to address 1 CVE. Fixed in 1.3.0-tuxcare.1.

Record
CLSA-2026-1774743817
Updated
2026-11-02
OSVCLSA-2026-1774743830No score

TuxCare security update for handlebars (3 CVEs)

TuxCare rebuilt handlebars to address 3 CVEs. Fixed in 1.0.12-tuxcare.2.

Record
CLSA-2026-1774743830
Updated
2026-11-02
OSVCLSA-2026-1775608269No score

TuxCare security update for dompurify (3 CVEs)

TuxCare rebuilt dompurify to address 3 CVEs. Fixed in 2.5.8-tuxcare.2.

Record
CLSA-2026-1775608269
Updated
2026-11-02
OSVCLSA-2026-1778460305No score

TuxCare security update for dompurify (3 CVEs)

TuxCare rebuilt dompurify to address 3 CVEs. Fixed in 3.1.6-tuxcare.2.

Record
CLSA-2026-1778460305
Updated
2026-11-02
OSVCLSA-2026-1778805976No score

TuxCare security update for dompurify (10 CVEs)

TuxCare rebuilt dompurify to address 10 CVEs. Fixed in 3.2.3-tuxcare.1.

Record
CLSA-2026-1778805976
Updated
2026-11-02
OSVCLSA-2026-1780274966No score

TuxCare security update for dompurify (10 CVEs)

TuxCare rebuilt dompurify to address 10 CVEs. Fixed in 3.0.3-tuxcare.1.

Record
CLSA-2026-1780274966
Updated
2026-11-02
OSVCLSA-2026-1780274972No score

TuxCare security update for dompurify (9 CVEs)

TuxCare rebuilt dompurify to address 9 CVEs. Fixed in 2.4.0-tuxcare.1.

Record
CLSA-2026-1780274972
Updated
2026-11-02
OSVCLSA-2026-1780361389No score

TuxCare security update for dompurify (9 CVEs)

TuxCare rebuilt dompurify to address 9 CVEs. Fixed in 2.4.7-tuxcare.1.

Record
CLSA-2026-1780361389
Updated
2026-11-02
OSVCLSA-2026-1784164097No score

TuxCare security update for dompurify (1 CVE)

TuxCare rebuilt dompurify to address 1 CVE. Fixed in 2.4.3-tuxcare.2.

Record
CLSA-2026-1784164097
Updated
2026-11-02
OSVCLSA-2026-1786636600No score

TuxCare security update for dompurify (16 CVEs)

TuxCare rebuilt dompurify to address 16 CVEs. Fixed in 2.4.0-tuxcare.1.

Record
CLSA-2026-1786636600
Updated
2026-11-02
OSVCLSA-2026-1786636721No score

TuxCare security update for dompurify (14 CVEs)

TuxCare rebuilt dompurify to address 14 CVEs. Fixed in 2.4.7-tuxcare.1.

Record
CLSA-2026-1786636721
Updated
2026-11-02
OSVCLSA-2026-1786731853No score

TuxCare security update for dompurify (10 CVEs)

TuxCare rebuilt dompurify to address 10 CVEs. Fixed in 3.2.3-tuxcare.3.

Record
CLSA-2026-1786731853
Updated
2026-11-02
OSVCLSA-2026-1786731948No score

TuxCare security update for dompurify (34 CVEs)

TuxCare rebuilt dompurify to address 34 CVEs. Fixed in 3.0.3-tuxcare.1.

Record
CLSA-2026-1786731948
Updated
2026-11-02
OSVCLSA-2026-1787602198No score

TuxCare security update for dompurify (10 CVEs)

TuxCare rebuilt dompurify to address 10 CVEs. Fixed in 3.2.7-tuxcare.1.

Record
CLSA-2026-1787602198
Updated
2026-11-02
OSVCLSA-2026-1789152222No score

TuxCare security update for dompurify (11 CVEs)

TuxCare rebuilt dompurify to address 11 CVEs. Fixed in 2.3.0-tuxcare.5.

Record
CLSA-2026-1789152222
Updated
2026-11-02
OSVCLSA-2026-1789154068No score

TuxCare security update for dompurify (12 CVEs)

TuxCare rebuilt dompurify to address 12 CVEs. Fixed in 3.0.3-tuxcare.5.

Record
CLSA-2026-1789154068
Updated
2026-11-02
OSVCLSA-2026-1789155659No score

TuxCare security update for dompurify (12 CVEs)

TuxCare rebuilt dompurify to address 12 CVEs. Fixed in 2.4.3-tuxcare.8.

Record
CLSA-2026-1789155659
Updated
2026-11-02
OSVCLSA-2026-1792155851No score

TuxCare security update for dompurify (12 CVEs)

TuxCare rebuilt dompurify to address 12 CVEs. Fixed in 3.1.3-tuxcare.2.

Record
CLSA-2026-1792155851
Updated
2026-11-02
OSVCLSA-2026-1792155956No score

TuxCare security update for dompurify (5 CVEs)

TuxCare rebuilt dompurify to address 5 CVEs. Fixed in 2.3.3-tuxcare.2.

Record
CLSA-2026-1792155956
Updated
2026-11-02
OSVCLSA-2026-1792156282No score

TuxCare security update for dompurify (11 CVEs)

TuxCare rebuilt dompurify to address 11 CVEs. Fixed in 3.1.4-tuxcare.2.

Record
CLSA-2026-1792156282
Updated
2026-11-02
OSVCLSA-2026-1792156382No score

TuxCare security update for dompurify (9 CVEs)

TuxCare rebuilt dompurify to address 9 CVEs. Fixed in 3.0.2-tuxcare.2.

Record
CLSA-2026-1792156382
Updated
2026-11-02
OSVCLSA-2026-1792156589No score

TuxCare security update for dompurify (10 CVEs)

TuxCare rebuilt dompurify to address 10 CVEs. Fixed in 3.0.9-tuxcare.2.

Record
CLSA-2026-1792156589
Updated
2026-11-02
OSVCLSA-2026-1792156694No score

TuxCare security update for dompurify (11 CVEs)

TuxCare rebuilt dompurify to address 11 CVEs. Fixed in 3.0.8-tuxcare.2.

Record
CLSA-2026-1792156694
Updated
2026-11-02
OSVCLSA-2026-1792156909No score

TuxCare security update for dompurify (10 CVEs)

TuxCare rebuilt dompurify to address 10 CVEs. Fixed in 3.0.1-tuxcare.2.

Record
CLSA-2026-1792156909
Updated
2026-11-02
OSVCLSA-2026-1792157013No score

TuxCare security update for dompurify (13 CVEs)

TuxCare rebuilt dompurify to address 13 CVEs. Fixed in 3.1.0-tuxcare.2.

Record
CLSA-2026-1792157013
Updated
2026-11-02
OSVCLSA-2026-1792157113No score

TuxCare security update for dompurify (12 CVEs)

TuxCare rebuilt dompurify to address 12 CVEs. Fixed in 3.0.11-tuxcare.2.

Record
CLSA-2026-1792157113
Updated
2026-11-02
OSVCLSA-2026-1792161408No score

TuxCare security update for dompurify (8 CVEs)

TuxCare rebuilt dompurify to address 8 CVEs. Fixed in 3.1.1-tuxcare.2.

Record
CLSA-2026-1792161408
Updated
2026-11-02
OSVCLSA-2026-1792161492No score

TuxCare security update for dompurify (10 CVEs)

TuxCare rebuilt dompurify to address 10 CVEs. Fixed in 3.2.6-tuxcare.2.

Record
CLSA-2026-1792161492
Updated
2026-11-02
OSVCLSA-2026-1792369452No score

TuxCare security update for dompurify (6 CVEs)

TuxCare rebuilt dompurify to address 6 CVEs. Fixed in 3.0.6-tuxcare.3.

Record
CLSA-2026-1792369452
Updated
2026-11-02
OSVCLSA-2026-1792424339No score

TuxCare security update for dompurify (10 CVEs)

TuxCare rebuilt dompurify to address 10 CVEs. Fixed in 2.0.8-tuxcare.3.

Record
CLSA-2026-1792424339
Updated
2026-11-02
OSVCLSA-2026-1792424891No score

TuxCare security update for dompurify (13 CVEs)

TuxCare rebuilt dompurify to address 13 CVEs. Fixed in 2.3.10-tuxcare.3.

Record
CLSA-2026-1792424891
Updated
2026-11-02
OSVCLSA-2026-1792453557No score

TuxCare security update for dompurify (5 CVEs)

TuxCare rebuilt dompurify to address 5 CVEs. Fixed in 3.0.5-tuxcare.2.

Record
CLSA-2026-1792453557
Updated
2026-11-02
OSVCLSA-2026-1792479087No score

TuxCare security update for dompurify (5 CVEs)

TuxCare rebuilt dompurify to address 5 CVEs. Fixed in 3.0.4-tuxcare.2.

Record
CLSA-2026-1792479087
Updated
2026-11-02
OSVCLSA-2026-1792593965No score

TuxCare security update for dompurify (10 CVEs)

TuxCare rebuilt dompurify to address 10 CVEs. Fixed in 3.1.2-tuxcare.3.

Record
CLSA-2026-1792593965
Updated
2026-11-02
OSVCLSA-2026-1792791410No score

TuxCare security update for dompurify (2 CVEs)

TuxCare rebuilt dompurify to address 2 CVEs. Fixed in 2.4.0-tuxcare.8.

Record
CLSA-2026-1792791410
Updated
2026-11-02
OSVGHSA-g9r4-xpmj-mj65No score

Prototype Pollution in handlebars

Versions of handlebars prior to 3.0.8 or 4.5.3 are vulnerable to prototype pollution. It is possible to add or modify properties to the Object prototype through a malicious template. This may allow attackers to crash the application or execute Arbitrary Code in specific conditions.

Recommendation

Upgrade to version 3.0.8, 4.5.3 or later.

Record
GHSA-g9r4-xpmj-mj65
Weakness
CWE-1321
Updated
2026-11-02
OSVGHSA-q2c6-c6pm-g3ghNo score

Arbitrary Code Execution in handlebars

Versions of handlebars prior to 3.0.8 or 4.5.3 are vulnerable to Arbitrary Code Execution. The package's lookup helper fails to properly validate templates, allowing attackers to submit templates that execute arbitrary JavaScript in the system. It is due to an incomplete fix for a previous issue. This vulnerability can be used to run arbitrary code in a server processing Handlebars templates or on a victim's browser (effectively serving as Cross-Site Scripting).

Recommendation

Upgrade to version 3.0.8, 4.5.3 or later.

Record
GHSA-q2c6-c6pm-g3gh
Updated
2026-11-02
OSVopenSUSE-SU-2026:12070-1No score

velociraptor-0.76.7.0.git145.b60ef1146-1.1 on GA media

These are all security issues fixed in the velociraptor-0.76.7.0.git145.b60ef1146-1.1 package on the GA media of openSUSE Tumbleweed.

Record
openSUSE-SU-2026:12070-1
Updated
2026-11-02
OSVROOT-APP-NPM-GHSA-2cf5-4w76-r9qvNo score

GHSA-2cf5-4w76-r9qv in handlebars - Patched by Root

Root has patched GHSA-2cf5-4w76-r9qv in the handlebars package for Root:npm. Multiple fixed versions available.

Record
ROOT-APP-NPM-GHSA-2cf5-4w76-r9qv
Updated
2026-11-02
OSVROOT-APP-NPM-GHSA-g9r4-xpmj-mj65No score

GHSA-g9r4-xpmj-mj65 in handlebars - Patched by Root

Root has patched GHSA-g9r4-xpmj-mj65 in the handlebars package for Root:npm. Multiple fixed versions available.

Record
ROOT-APP-NPM-GHSA-g9r4-xpmj-mj65
Updated
2026-11-02
OSVROOT-APP-NPM-GHSA-h8r8-wccr-v5f2No score

GHSA-h8r8-wccr-v5f2 in dompurify - Patched by Root

Root has patched GHSA-h8r8-wccr-v5f2 in the dompurify package for Root:npm. Multiple fixed versions available.

Record
ROOT-APP-NPM-GHSA-h8r8-wccr-v5f2
Updated
2026-11-02
OSVROOT-APP-NPM-GHSA-q2c6-c6pm-g3ghNo score

GHSA-q2c6-c6pm-g3gh in handlebars - Patched by Root

Root has patched GHSA-q2c6-c6pm-g3gh in the handlebars package for Root:npm. Multiple fixed versions available.

Record
ROOT-APP-NPM-GHSA-q2c6-c6pm-g3gh
Updated
2026-11-02

History

History
RecordedChangedSources
affected, aliases, references
affected, aliases
affected
facts
affected
first indexedCVE List, EUVD, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

References

Show 142 moreShow less
This page doesn't list everything

Left out here: the rest of 2 source descriptions. The JSON record has them. Left out on purpose, here and in the API, to keep responses small: 1 source record.

MoveEnter Open