Description
DOMPurify before 3.4.0 contains a logic error in the ADD_TAGS function where short-circuit evaluation allows forbidden tags to bypass FORBID_TAGS restrictions. Attackers can craft input containing tags listed in FORBID_TAGS that are also added via ADD_TAGS function, causing them to be retained in sanitized output.
Published: 2026-07-23
Score: 5.1 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerability is a logic error in the ADD_TAGS function of DOMPurify, where short‑circuit evaluation allows tags listed in FORBID_TAGS to slip through the filter. This flaw involves CWE‑697 and CWE‑79. When an attacker supplies such a tag, it is added to the output, potentially introducing malicious content such as scripts. Based on the description, it is inferred that if the FORBID_TAGS list includes script tags, this could lead to cross‑site scripting when sanitized user input is rendered in a browser.

Affected Systems

The affected product is the DOMPurify library from cure53, versions prior to 3.4.0. Any web application that depends on those versions and uses the ADD_TAGS function is potentially vulnerable.

Risk and Exploitability

The CVSS base score of 5.1 shows a moderate severity, and the EPSS value of less than 1% indicates a low probability of exploitation at the time of this analysis. The vulnerability is not listed in CISA’s KEV catalog. Exploitability requires the attacker to supply crafted input processed by a vulnerable instance of DOMPurify; no network‑reachable vulnerability is disclosed, so the attack surface is limited to environments that accept user‑generated content. Based on the description, it is inferred that the presence of script tags in the FORBID_TAGS list could enable XSS attacks.

Generated by OpenCVE AI on August 3, 2026 at 21:31 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade DOMPurify to version 3.4.0 or newer to apply the vendor‑provided fix.
  • Review code that calls ADD_TAGS and ensure it does not re‑introduce forbidden tags; consider limiting the tag list or removing its usage if possible.
  • Deploy a web application firewall or content security policy to mitigate cross‑site scripting risks in case sanitized output still contains malicious payloads.

Generated by OpenCVE AI on August 3, 2026 at 21:31 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-39q2-94rc-95cp DOMPurify's ADD_TAGS function form bypasses FORBID_TAGS due to short-circuit evaluation
History

Tue, 28 Jul 2026 00:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-79
References
Metrics threat_severity

None

threat_severity

Moderate


Thu, 23 Jul 2026 21:45:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Thu, 23 Jul 2026 13:30:00 +0000

Type Values Removed Values Added
Description DOMPurify before 3.4.0 contains a logic error in the ADD_TAGS function where short-circuit evaluation allows forbidden tags to bypass FORBID_TAGS restrictions. Attackers can craft input containing tags listed in FORBID_TAGS that are also added via ADD_TAGS function, causing them to be retained in sanitized output.
Title DOMPurify before 3.4.0 ADD_TAGS Function Bypasses FORBID_TAGS
First Time appeared Cure53
Cure53 dompurify
Weaknesses CWE-697
CPEs cpe:2.3:a:cure53:dompurify:*:*:*:*:*:*:*:*
Vendors & Products Cure53
Cure53 dompurify
References
Metrics cvssV3_1

{'score': 6.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N'}

cvssV4_0

{'score': 5.1, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N'}


Subscriptions

Cure53 Dompurify
cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-07-23T15:35:54.823Z

Reserved: 2026-07-23T11:03:13.092Z

Link: CVE-2026-65903

cve-icon Vulnrichment

Updated: 2026-07-23T15:35:48.977Z

cve-icon NVD

Status : Analyzed

Published: 2026-07-23T14:18:05.903

Modified: 2026-07-28T15:51:38.570

Link: CVE-2026-65903

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-07-23T13:16:21Z

Links: CVE-2026-65903 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-08-03T21:45:03Z

Weaknesses
  • CWE-697

    Incorrect Comparison

  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')