CVE-2026-41240: CWE-183: Permissive List of Allowed Inputs in cure53 DOMPurify
DOMPurify versions prior to 3. 4. 0 contain a vulnerability where forbidden HTML elements can bypass sanitization due to inconsistent handling of FORBID_TAGS compared to FORBID_ATTR when function-based ADD_TAGS is used. This flaw allows disallowed elements to remain in the sanitized output with their attributes intact. The issue was fixed in version 3. 4. 0.
AI Analysis
Technical Summary
DOMPurify is a sanitizer designed to prevent cross-site scripting by cleaning HTML, MathML, and SVG inputs. In versions before 3.4.0, an inconsistency exists in how forbidden tags and attributes are processed: an early exit was added for forbidden attributes but not for forbidden tags, causing the FORBID_TAGS check to be skipped under certain conditions. This permits forbidden elements to survive sanitization with their attributes, potentially enabling injection of malicious content. The vulnerability is tracked as CVE-2026-41240 and was addressed in version 3.4.0.
Potential Impact
The vulnerability allows forbidden HTML elements to bypass sanitization and remain in the output with their attributes intact, increasing the risk of cross-site scripting (XSS) attacks. This can lead to execution of malicious scripts in the context of the affected application, potentially compromising user data or session integrity. The CVSS 4.0 score is 6.0 (medium severity), reflecting network attack vector, low attack complexity, partial attack complexity, no privileges required, user interaction required, and high impact on integrity.
Mitigation Recommendations
Upgrade to DOMPurify version 3.4.0 or later, where this issue is fixed. There is no official patch or temporary fix other than upgrading. Users should verify that their sanitization configurations do not rely on the vulnerable behavior and ensure that FORBID_TAGS is properly enforced by using the patched version.
CVE-2026-41240: CWE-183: Permissive List of Allowed Inputs in cure53 DOMPurify
Description
DOMPurify versions prior to 3. 4. 0 contain a vulnerability where forbidden HTML elements can bypass sanitization due to inconsistent handling of FORBID_TAGS compared to FORBID_ATTR when function-based ADD_TAGS is used. This flaw allows disallowed elements to remain in the sanitized output with their attributes intact. The issue was fixed in version 3. 4. 0.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
DOMPurify is a sanitizer designed to prevent cross-site scripting by cleaning HTML, MathML, and SVG inputs. In versions before 3.4.0, an inconsistency exists in how forbidden tags and attributes are processed: an early exit was added for forbidden attributes but not for forbidden tags, causing the FORBID_TAGS check to be skipped under certain conditions. This permits forbidden elements to survive sanitization with their attributes, potentially enabling injection of malicious content. The vulnerability is tracked as CVE-2026-41240 and was addressed in version 3.4.0.
Potential Impact
The vulnerability allows forbidden HTML elements to bypass sanitization and remain in the output with their attributes intact, increasing the risk of cross-site scripting (XSS) attacks. This can lead to execution of malicious scripts in the context of the affected application, potentially compromising user data or session integrity. The CVSS 4.0 score is 6.0 (medium severity), reflecting network attack vector, low attack complexity, partial attack complexity, no privileges required, user interaction required, and high impact on integrity.
Mitigation Recommendations
Upgrade to DOMPurify version 3.4.0 or later, where this issue is fixed. There is no official patch or temporary fix other than upgrading. Users should verify that their sanitization configurations do not rely on the vulnerable behavior and ensure that FORBID_TAGS is properly enforced by using the patched version.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-04-18T03:47:03.135Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 69ea588387115cfb683b9248
Added to database: 4/23/2026, 5:36:03 PM
Last enriched: 4/23/2026, 5:51:09 PM
Last updated: 4/23/2026, 8:14:57 PM
Views: 5
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.