Skip to content

CVE-2026-0540 (Medium) detected in dompurify-3.3.0.tgz - autoclosed #2609

@mend-for-github-com

Description

@mend-for-github-com

CVE-2026-0540 - Medium Severity Vulnerability

Vulnerable Library - dompurify-3.3.0.tgz

DOMPurify is a DOM-only, super-fast, uber-tolerant XSS sanitizer for HTML, MathML and SVG. It's written in JavaScript and works in all modern browsers (Safari, Opera (15+), Internet Explorer (10+), Firefox and Chrome - as well as almost anything else usin

Library home page: https://registry.npmjs.org/dompurify/-/dompurify-3.3.0.tgz

Path to dependency file: /package.json

Path to vulnerable library: /package.json

Dependency Hierarchy:

  • isomorphic-dompurify-2.26.0.tgz (Root Library)
    • dompurify-3.3.0.tgz (Vulnerable Library)

Found in HEAD commit: 147b33480c570f8547e044ff829bba5947ed3229

Found in base branch: main

Vulnerability Details

DOMPurify 3.1.3 through 3.3.1 and 2.5.3 through 2.5.8, fixed in commit 729097f, contain a cross-site scripting vulnerability that allows attackers to bypass attribute sanitization by exploiting five missing rawtext elements (noscript, xmp, noembed, noframes, iframe) in the SAFE_FOR_XML regex. Attackers can include payloads like in attribute values to execute JavaScript when sanitized output is placed inside these unprotected rawtext contexts.
Mend Note: The description of this vulnerability differs from MITRE.

Publish Date: 2026-03-03

URL: CVE-2026-0540

CVSS 3 Score Details (6.1)

Base Score Metrics:

  • Exploitability Metrics:
    • Attack Vector: Network
    • Attack Complexity: Low
    • Privileges Required: None
    • User Interaction: Required
    • Scope: Changed
  • Impact Metrics:
    • Confidentiality Impact: Low
    • Integrity Impact: Low
    • Availability Impact: None

For more information on CVSS3 Scores, click here.

Suggested Fix

Type: Upgrade version

Origin: GHSA-v2wj-7wpq-c8vv

Release Date: 2026-03-03

Fix Resolution: dompurify - 3.3.2,dompurify - 2.5.9

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions