Every CVESearch/Get API key

CVE-2026-65899

DOMPurify before 3.4.9 Trusted Types Policy State Contamination

5.1 MediumFix available

CVE-2026-65899 is a medium vulnerability (CVSS 5.1) 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.41%, the 36th percentile. Fixed in handlebars 3.0.8.

What does this mean?
Severity
5.1 MediumCVSS 4.0, CVE List
Exploit chance
0.41%EPSS, 36th percentile
Exploitation
None knownNot on CISA’s or ENISA’s lists
Fixed in
3.0.8handlebars +50 more

Description

DOMPurify 3.0.0 before 3.4.9 does not reset the retained Trusted Types policy when clearConfig() is called, so a DOMPurify instance reused across trust boundaries stays bound to a previously supplied TRUSTED_TYPES_POLICY. A later caller that requests RETURN_TRUSTED_TYPE output receives a TrustedHTML object created by the old (potentially unsafe) policy rather than a clean default, which can lead to script execution at a Trusted Types sink. Passing TRUSTED_TYPES_POLICY: null on the later call also does not clear the retained policy.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
Active

What an attacker can affect

Confidentiality
None
Integrity
None
Availability
None

Exploit likelihood

0.41%Up 0.2 points 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
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
dompurify
npm
before 3.4.9
3.4.9
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
3.0.3-tuxcare.0 up to 3.0.3-tuxcare.2, plus listed versions
3.0.33.0.3-tuxcare.1
3.0.3-tuxcare.2
Show 41 moreShow less
Affected packages
PackageAffectedFixed
dompurify
TuxCare:npm
From an advisory covering 2 CVEs
3.2.3-tuxcare.0 up to 3.2.3-tuxcare.2, plus listed versions
3.2.33.2.3-tuxcare.1
3.2.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 6 CVEs
3.1.6-tuxcare.0 up to 3.1.6-tuxcare.7, plus listed versions
3.1.63.1.6-tuxcare.13.1.6-tuxcare.23.1.6-tuxcare.33.1.6-tuxcare.43.1.6-tuxcare.53.1.6-tuxcare.6
3.1.6-tuxcare.7
dompurify
TuxCare:npm
3.4.8-tuxcare.0 up to 3.4.8-tuxcare.1, plus listed versions
3.4.8
3.4.8-tuxcare.1
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 4 CVEs
3.2.7-tuxcare.0 up to 3.2.7-tuxcare.3, plus listed versions
3.2.73.2.7-tuxcare.13.2.7-tuxcare.2
3.2.7-tuxcare.3
dompurify
TuxCare:npm
From an advisory covering 6 CVEs
3.4.5-tuxcare.0 up to 3.4.5-tuxcare.2, plus listed versions
3.4.53.4.5-tuxcare.1
3.4.5-tuxcare.2
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 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 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 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 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 12 CVEs
2.3.3-tuxcare.0 up to 2.3.3-tuxcare.3, plus listed versions
2.3.32.3.3-tuxcare.12.3.3-tuxcare.2
2.3.3-tuxcare.3
dompurify
TuxCare:npm
From an advisory covering 9 CVEs
3.3.3-tuxcare.0 up to 3.3.3-tuxcare.3, plus listed versions
3.3.33.3.3-tuxcare.13.3.3-tuxcare.2
3.3.3-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 10 CVEs
3.0.1-tuxcare.0 up to 3.0.1-tuxcare.3, plus listed versions
3.0.13.0.1-tuxcare.13.0.1-tuxcare.2
3.0.1-tuxcare.3
dompurify
TuxCare:npm
From an advisory covering 10 CVEs
3.0.2-tuxcare.0 up to 3.0.2-tuxcare.3, plus listed versions
3.0.23.0.2-tuxcare.13.0.2-tuxcare.2
3.0.2-tuxcare.3
dompurify
TuxCare:npm
From an advisory covering 8 CVEs
3.0.8-tuxcare.0 up to 3.0.8-tuxcare.3, plus listed versions
3.0.83.0.8-tuxcare.13.0.8-tuxcare.2
3.0.8-tuxcare.3
dompurify
TuxCare:npm
From an advisory covering 4 CVEs
3.4.6-tuxcare.0 up to 3.4.6-tuxcare.3, plus listed versions
3.4.63.4.6-tuxcare.13.4.6-tuxcare.2
3.4.6-tuxcare.3
dompurify
TuxCare:npm
From an advisory covering 9 CVEs
3.0.9-tuxcare.0 up to 3.0.9-tuxcare.3, plus listed versions
3.0.93.0.9-tuxcare.13.0.9-tuxcare.2
3.0.9-tuxcare.3
dompurify
TuxCare:npm
From an advisory covering 2 CVEs
3.4.7-tuxcare.0 up to 3.4.7-tuxcare.3, plus listed versions
3.4.73.4.7-tuxcare.13.4.7-tuxcare.2
3.4.7-tuxcare.3
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 11 CVEs
3.1.1-tuxcare.0 up to 3.1.1-tuxcare.3, plus listed versions
3.1.13.1.1-tuxcare.13.1.1-tuxcare.2
3.1.1-tuxcare.3
dompurify
TuxCare:npm
From an advisory covering 5 CVEs
3.0.6-tuxcare.0 up to 3.0.6-tuxcare.5, plus listed versions
3.0.63.0.6-tuxcare.13.0.6-tuxcare.23.0.6-tuxcare.33.0.6-tuxcare.4
3.0.6-tuxcare.5
dompurify
TuxCare:npm
From an advisory covering 9 CVEs
3.4.0-tuxcare.0 up to 3.4.0-tuxcare.1, plus listed versions
3.4.0
3.4.0-tuxcare.1
dompurify
TuxCare:npm
From an advisory covering 10 CVEs
3.0.5-tuxcare.0 up to 3.0.5-tuxcare.4, plus listed versions
3.0.53.0.5-tuxcare.13.0.5-tuxcare.23.0.5-tuxcare.3
3.0.5-tuxcare.4
dompurify
TuxCare:npm
From an advisory covering 10 CVEs
3.0.4-tuxcare.0 up to 3.0.4-tuxcare.4, plus listed versions
3.0.43.0.4-tuxcare.13.0.4-tuxcare.23.0.4-tuxcare.3
3.0.4-tuxcare.4
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.4.12+dfsg-1, 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-23.4.1+dfsg-13.4.2+dfsg-13.4.5+dfsg-1
3.4.12+dfsg-1
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
grafana13.1
Red Hat:hummingbird:1
From an advisory covering 4 CVEs
before 0:13.1.3-0.1.3.hum1
0:13.1.3-0.1.3.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
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
node-dompurify
Ubuntu:26.04:LTS
All versions, plus listed versions
3.1.7+dfsg+~3.0.5-23.3.3+dfsg-1
None known
python-comfyui-frontend-package
openSUSE:Tumbleweed
From an advisory covering 3 CVEs
before 1.52.7-1.1
1.52.7-1.1

What each source reports

CVE List Score used5.1

DOMPurify before 3.4.9 Trusted Types Policy State Contamination

DOMPurify 3.0.0 before 3.4.9 does not reset the retained Trusted Types policy when clearConfig() is called, so a DOMPurify instance reused across trust boundaries stays bound to a previously supplied TRUSTED_TYPES_POLICY. A later caller that requests RETURN_TRUSTED_TYPE output receives a TrustedHTML object created by the old (potentially unsafe) policy rather than a clean default, which can lead to script execution at a Trusted Types sink. Passing TRUSTED_TYPES_POLICY: null on the later call also does not clear the retained policy.

Record
CVE-2026-65899
CVSS 4.0
5.1 MediumCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/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
Weakness
CWE-693
Updated
2026-11-02
EUVDEUVD-2026-482685.1

DOMPurify 3.0.0 before 3.4.9 does not reset the retained Trusted Types policy when clearConfig() is called, so a DOMPurify instance reused across trust boundaries stays bound to a previously supplied TRUSTED_TYPES_POLICY. A later caller that requests RETURN_TRUSTED_TYPE output receives a TrustedHTML object created by the old (potentially unsafe) policy rather than a clean default, which can lead to script execution at a Trusted Types sink. Passing TRUSTED_TYPES_POLICY: null on the later call also does not clear the retained policy.

Record
EUVD-2026-48268
CVSS 4.0
5.1 MediumCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/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-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-vxr8-fq34-vvx92.1

DOMPurify: Trusted Types policy survives `clearConfig()` and can poison later `RETURN_TRUSTED_TYPE` output

Impact

A DOMPurify instance that is reused across trust boundaries can stay bound to a previously supplied TRUSTED_TYPES_POLICY even after clearConfig() is called. A later caller that requests RETURN_TRUSTED_TYPE receives a TrustedHTML object created by the old policy, not by a clean default configuration.

If the old policy is unsafe or controlled by a less-trusted integration, this turns a later "default" sanitize call into script execution at a Trusted Types sink. TRUSTED_TYPES_POLICY: null on the later call also does not clear the retained policy. dompurify-trusted-types-policy-survives-clearconfig-poc.js

Affected version

Tested against DOMPurify 3.4.8, repository commit 825e617753ac1169306a542d3174a77f717a0cf6.

Root cause

_parseConfig() overwrites trustedTypesPolicy when cfg.TRUSTED_TYPES_POLICY is truthy, but the default/null path only initializes the internal policy when trustedTypesPolicy === undefined. Once a custom policy has been set, later default config parsing leaves it in place.

Relevant code:

  • src/purify.ts:786-812 accepts and stores cfg.TRUSTED_TYPES_POLICY.
  • src/purify.ts:813-832 does not reset an existing policy when config has no policy or has TRUSTED_TYPES_POLICY: null.
  • src/purify.ts:2123-2125 signs the final serialized HTML with the retained policy when RETURN_TRUSTED_TYPE is true.
  • src/purify.ts:2133-2136 clearConfig() only clears CONFIG and SET_CONFIG; it does not reset trustedTypesPolicy or emptyHTML.

Local PoC

Run from the DOMPurify checkout, or set DOMPURIFY_REPO:

node /home/dompurify-trusted-types-policy-survives-clearconfig-poc.js

Observed output:

{
  "result": {
    "baseline": "<b>baseline</b>",
    "duringPolicy": "<img src=x onerror=alert(\"TT_POLICY_SURVIVED_CLEARCONFIG\")>",
    "afterClearString": "<img src=\"x\">",
    "afterClearTrustedType": "[object TrustedHTML]",
    "afterClearTrusted": "<img src=x onerror=alert(\"TT_POLICY_SURVIVED_CLEARCONFIG\")>",
    "afterNullTrusted": "<img src=x onerror=alert(\"TT_POLICY_SURVIVED_CLEARCONFIG\")>",
    "mountedHTML": "<img src=\"x\" onerror=\"alert(&quot;TT_POLICY_SURVIVED_CLEARCONFIG&quot;)\">"
  },
  "dialogs": [
    "TT_POLICY_SURVIVED_CLEARCONFIG"
  ]
}

The important part is the split behavior after cleanup:

  • purify.clearConfig(); purify.sanitize(...); returns a normal sanitized string (<img src="x">), because the later call is not asking for a Trusted Type.
  • purify.clearConfig(); purify.sanitize(..., { RETURN_TRUSTED_TYPE: true }); still uses the old policy and returns attacker-controlled TrustedHTML.
  • Passing { TRUSTED_TYPES_POLICY: null, RETURN_TRUSTED_TYPE: true } also still returns attacker-controlled TrustedHTML.

Preconditions

This is a shared-instance state contamination issue. It matters when one DOMPurify instance is reused by multiple integrations, plugins, request handlers, or components with different trust levels, and a cleanup step relies on clearConfig() to restore safe defaults.

This is not a default string-input bypass. An attacker must be able to influence a prior TRUSTED_TYPES_POLICY on the reused instance, or a less-trusted integration must have installed an unsafe policy.

Severity

impact is XSS at a Trusted Types sink in applications that reuse a DOMPurify instance across trust boundaries. Attack complexity is high because exploitation depends on prior policy injection or a less-trusted integration and a later RETURN_TRUSTED_TYPE sink.

Suggested fix

Make clearConfig() reset Trusted Types state as part of restoring defaults, or have _parseConfig() explicitly clear trustedTypesPolicy and emptyHTML when TRUSTED_TYPES_POLICY: null is supplied.

Record
GHSA-vxr8-fq34-vvx9
CVSS 4.0
2.1 LowCVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
Weakness
CWE-693
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 50 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.1

DOMPurify 3.0.0 before 3.4.9 does not reset the retained Trusted Types policy when clearConfig() is called, so a DOMPurify instance reused across trust boundaries stays bound to a previously supplied TRUSTED_TYPES_POLICY. A later caller that requests RETURN_TRUSTED_TYPE output receives a TrustedHTML object created by the old (potentially unsafe) policy rather than a clean default, which can lead to script execution at a Trusted Types sink. Passing TRUSTED_TYPES_POLICY: null on the later call also does not clear the retained policy.

Record
CVE-2026-65899
CVSS 4.0
5.1 MediumCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/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-693
Updated
2026-11-02
OSV5.1

DOMPurify before 3.4.9 Trusted Types Policy State Contamination

DOMPurify 3.0.0 before 3.4.9 does not reset the retained Trusted Types policy when clearConfig() is called, so a DOMPurify instance reused across trust boundaries stays bound to a previously supplied TRUSTED_TYPES_POLICY. A later caller that requests RETURN_TRUSTED_TYPE output receives a TrustedHTML object created by the old (potentially unsafe) policy rather than a clean default, which can lead to script execution at a Trusted Types sink. Passing TRUSTED_TYPES_POLICY: null on the later call also does not clear the retained policy.

Record
CVE-2026-65899
CVSS 4.0
5.1 MediumCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
Weakness
CWE-693
Updated
2026-11-11
OSVDEBIAN-CVE-2026-658995.1

DOMPurify 3.0.0 before 3.4.9 does not reset the retained Trusted Types policy when clearConfig() is called, so a DOMPurify instance reused across trust boundaries stays bound to a previously supplied TRUSTED_TYPES_POLICY. A later caller that requests RETURN_TRUSTED_TYPE output receives a TrustedHTML object created by the old (potentially unsafe) policy rather than a clean default, which can lead to script execution at a Trusted Types sink. Passing TRUSTED_TYPES_POLICY: null on the later call also does not clear the retained policy.

Record
DEBIAN-CVE-2026-65899
CVSS 4.0
5.1 MediumCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/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
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-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
OSVGHSA-vxr8-fq34-vvx92.1

DOMPurify: Trusted Types policy survives `clearConfig()` and can poison later `RETURN_TRUSTED_TYPE` output

Impact

A DOMPurify instance that is reused across trust boundaries can stay bound to a previously supplied TRUSTED_TYPES_POLICY even after clearConfig() is called. A later caller that requests RETURN_TRUSTED_TYPE receives a TrustedHTML object created by the old policy, not by a clean default configuration.

If the old policy is unsafe or controlled by a less-trusted integration, this turns a later "default" sanitize call into script execution at a Trusted Types sink. TRUSTED_TYPES_POLICY: null on the later call also does not clear the retained policy. dompurify-trusted-types-policy-survives-clearconfig-poc.js

Affected version

Tested against DOMPurify 3.4.8, repository commit 825e617753ac1169306a542d3174a77f717a0cf6.

Root cause

_parseConfig() overwrites trustedTypesPolicy when cfg.TRUSTED_TYPES_POLICY is truthy, but the default/null path only initializes the internal policy when trustedTypesPolicy === undefined. Once a custom policy has been set, later default config parsing leaves it in place.

Relevant code:

  • src/purify.ts:786-812 accepts and stores cfg.TRUSTED_TYPES_POLICY.
  • src/purify.ts:813-832 does not reset an existing policy when config has no policy or has TRUSTED_TYPES_POLICY: null.
  • src/purify.ts:2123-2125 signs the final serialized HTML with the retained policy when RETURN_TRUSTED_TYPE is true.
  • src/purify.ts:2133-2136 clearConfig() only clears CONFIG and SET_CONFIG; it does not reset trustedTypesPolicy or emptyHTML.

Local PoC

Run from the DOMPurify checkout, or set DOMPURIFY_REPO:

node /home/dompurify-trusted-types-policy-survives-clearconfig-poc.js

Observed output:

{
  "result": {
    "baseline": "<b>baseline</b>",
    "duringPolicy": "<img src=x onerror=alert(\"TT_POLICY_SURVIVED_CLEARCONFIG\")>",
    "afterClearString": "<img src=\"x\">",
    "afterClearTrustedType": "[object TrustedHTML]",
    "afterClearTrusted": "<img src=x onerror=alert(\"TT_POLICY_SURVIVED_CLEARCONFIG\")>",
    "afterNullTrusted": "<img src=x onerror=alert(\"TT_POLICY_SURVIVED_CLEARCONFIG\")>",
    "mountedHTML": "<img src=\"x\" onerror=\"alert(&quot;TT_POLICY_SURVIVED_CLEARCONFIG&quot;)\">"
  },
  "dialogs": [
    "TT_POLICY_SURVIVED_CLEARCONFIG"
  ]
}

The important part is the split behavior after cleanup:

  • purify.clearConfig(); purify.sanitize(...); returns a normal sanitized string (<img src="x">), because the later call is not asking for a Trusted Type.
  • purify.clearConfig(); purify.sanitize(..., { RETURN_TRUSTED_TYPE: true }); still uses the old policy and returns attacker-controlled TrustedHTML.
  • Passing { TRUSTED_TYPES_POLICY: null, RETURN_TRUSTED_TYPE: true } also still returns attacker-controlled TrustedHTML.

Preconditions

This is a shared-instance state contamination issue. It matters when one DOMPurify instance is reused by multiple integrations, plugins, request handlers, or components with different trust levels, and a cleanup step relies on clearConfig() to restore safe defaults.

This is not a default string-input bypass. An attacker must be able to influence a prior TRUSTED_TYPES_POLICY on the reused instance, or a less-trusted integration must have installed an unsafe policy.

Severity

impact is XSS at a Trusted Types sink in applications that reuse a DOMPurify instance across trust boundaries. Attack complexity is high because exploitation depends on prior policy injection or a less-trusted integration and a later RETURN_TRUSTED_TYPE sink.

Suggested fix

Make clearConfig() reset Trusted Types state as part of restoring defaults, or have _parseConfig() explicitly clear trustedTypesPolicy and emptyHTML when TRUSTED_TYPES_POLICY: null is supplied.

Record
GHSA-vxr8-fq34-vvx9
CVSS 4.0
2.1 LowCVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
Weakness
CWE-693
Updated
2026-11-02
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
OSVRHSA-2026:585026.1

Red Hat Security Advisory: Red Hat Hardened Images RPMs bug fix and enhancement update

Record
RHSA-2026:58502
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-658995.1

DOMPurify 3.0.0 before 3.4.9 does not reset the retained Trusted Types policy when clearConfig() is called, so a DOMPurify instance reused across trust boundaries stays bound to a previously supplied TRUSTED_TYPES_POLICY. A later caller that requests RETURN_TRUSTED_TYPE output receives a TrustedHTML object created by the old (potentially unsafe) policy rather than a clean default, which can lead to script execution at a Trusted Types sink. Passing TRUSTED_TYPES_POLICY: null on the later call also does not clear the retained policy.

Record
UBUNTU-CVE-2026-65899
CVSS 4.0
5.1 MediumCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/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-1784596279No score

TuxCare security update for dompurify (7 CVEs)

TuxCare rebuilt dompurify to address 7 CVEs. Fixed in 3.0.3-tuxcare.2.

Record
CLSA-2026-1784596279
Updated
2026-11-02
OSVCLSA-2026-1784682987No score

TuxCare security update for dompurify (8 CVEs)

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

Record
CLSA-2026-1784682987
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-1786731971No score

TuxCare security update for dompurify (7 CVEs)

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

Record
CLSA-2026-1786731971
Updated
2026-11-02
OSVCLSA-2026-1787599751No score

TuxCare security update for dompurify (2 CVEs)

TuxCare rebuilt dompurify to address 2 CVEs. Fixed in 3.4.8-tuxcare.1.

Record
CLSA-2026-1787599751
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-1789400953No score

TuxCare security update for dompurify (4 CVEs)

TuxCare rebuilt dompurify to address 4 CVEs. Fixed in 3.2.7-tuxcare.3.

Record
CLSA-2026-1789400953
Updated
2026-11-02
OSVCLSA-2026-1792150209No score

TuxCare security update for dompurify (9 CVEs)

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

Record
CLSA-2026-1792150209
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-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-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-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-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-1792424449No score

TuxCare security update for dompurify (12 CVEs)

TuxCare rebuilt dompurify to address 12 CVEs. Fixed in 2.3.3-tuxcare.3.

Record
CLSA-2026-1792424449
Updated
2026-11-05
OSVCLSA-2026-1792424561No score

TuxCare security update for dompurify (9 CVEs)

TuxCare rebuilt dompurify to address 9 CVEs. Fixed in 3.3.3-tuxcare.3.

Record
CLSA-2026-1792424561
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-1792486117No score

TuxCare security update for dompurify (10 CVEs)

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

Record
CLSA-2026-1792486117
Updated
2026-11-02
OSVCLSA-2026-1792486837No score

TuxCare security update for dompurify (10 CVEs)

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

Record
CLSA-2026-1792486837
Updated
2026-11-02
OSVCLSA-2026-1792495646No score

TuxCare security update for dompurify (8 CVEs)

TuxCare rebuilt dompurify to address 8 CVEs. Fixed in 3.0.8-tuxcare.3.

Record
CLSA-2026-1792495646
Updated
2026-11-02
OSVCLSA-2026-1792495764No score

TuxCare security update for dompurify (4 CVEs)

TuxCare rebuilt dompurify to address 4 CVEs. Fixed in 3.4.6-tuxcare.3.

Record
CLSA-2026-1792495764
Updated
2026-11-02
OSVCLSA-2026-1792496766No score

TuxCare security update for dompurify (9 CVEs)

TuxCare rebuilt dompurify to address 9 CVEs. Fixed in 3.0.9-tuxcare.3.

Record
CLSA-2026-1792496766
Updated
2026-11-02
OSVCLSA-2026-1792496892No score

TuxCare security update for dompurify (2 CVEs)

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

Record
CLSA-2026-1792496892
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-1792594075No score

TuxCare security update for dompurify (11 CVEs)

TuxCare rebuilt dompurify to address 11 CVEs. Fixed in 3.1.1-tuxcare.3.

Record
CLSA-2026-1792594075
Updated
2026-11-02
OSVCLSA-2026-1792929243No score

TuxCare security update for dompurify (7 CVEs)

TuxCare rebuilt dompurify to address 7 CVEs. Fixed in 3.0.6-tuxcare.5.

Record
CLSA-2026-1792929243
Updated
2026-11-02
OSVCLSA-2026-1792933945No score

TuxCare security update for dompurify (12 CVEs)

TuxCare rebuilt dompurify to address 12 CVEs. Fixed in 3.4.0-tuxcare.1.

Record
CLSA-2026-1792933945
Updated
2026-11-02
OSVCLSA-2026-1793101871No score

TuxCare security update for dompurify (11 CVEs)

TuxCare rebuilt dompurify to address 11 CVEs. Fixed in 3.0.5-tuxcare.4.

Record
CLSA-2026-1793101871
Updated
2026-11-02
OSVCLSA-2026-1793102041No score

TuxCare security update for dompurify (11 CVEs)

TuxCare rebuilt dompurify to address 11 CVEs. Fixed in 3.0.4-tuxcare.4.

Record
CLSA-2026-1793102041
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:11723-1No score

python313-comfyui-frontend-package-1.52.7-1.1 on GA media

These are all security issues fixed in the python313-comfyui-frontend-package-1.52.7-1.1 package on the GA media of openSUSE Tumbleweed.

Record
openSUSE-SU-2026:11723-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-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
OSVROOT-APP-NPM-GHSA-q42p-pg8m-cqh6No score

GHSA-q42p-pg8m-cqh6 in handlebars - Patched by Root

Root has patched GHSA-q42p-pg8m-cqh6 in the handlebars package for Root:npm. Multiple fixed versions available.

Record
ROOT-APP-NPM-GHSA-q42p-pg8m-cqh6
Updated
2026-11-02
OSVROOT-APP-NPM-GHSA-vxr8-fq34-vvx9No score

GHSA-vxr8-fq34-vvx9 in @rootio/dompurify - Patched by Root

Root has patched GHSA-vxr8-fq34-vvx9 in the @rootio/dompurify package for Root:npm. Multiple fixed versions available.

Record
ROOT-APP-NPM-GHSA-vxr8-fq34-vvx9
Updated
2026-11-02

History

History
RecordedChangedSources
affected, aliases, referencesOSV
affected
factsOSV
affected
first indexedCVE List, EUVD, GitHub Advisories, NVD, OSV

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

References

Show 72 moreShow less
MoveEnter Open