CVE-2026-65903

DOMPurify before 3.4.0 ADD_TAGS Function Bypasses FORBID_TAGS

Published Jul 23, 2026 CVSS 4.0 · 5.1 Medium EPSS 4.1% KEV · Not listed
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.

Analysis

AI-generated

Technical 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.

Remediation

No solution or workaround provided in the CVE record.

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
Type Values Removed Values Added
Metrics ssvc

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

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'}

Weaknesses
  • CWE-697

    Incorrect Comparison

  • CWE-79

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

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Jul 23, 2026, 3:35 PM
Reserved
Jul 23, 2026, 11:03 AM
Status
Analyzed
Published
Jul 23, 2026, 2:18 PM
Modified
Oct 24, 2026, 1:10 PM
Severity
Moderate
Public date
Jul 23, 2026, 1:16 PM