Skip to content

CVE-2026-0540 (Medium) detected in dompurify-3.3.1.tgz #9886

@mend-bolt-for-github

Description

@mend-bolt-for-github

CVE-2026-0540 - Medium Severity Vulnerability

Vulnerable Library - dompurify-3.3.1.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.1.tgz

Path to dependency file: /package.json

Path to vulnerable library: /home/wss-scanner/.yarn/berry/cache/dompurify-npm-3.3.1-5bbe58c5ff-10.zip

Dependency Hierarchy:

  • dompurify-3.3.1.tgz (Vulnerable Library)

Found in HEAD commit: d87706978173ac6516da5e83374518c21263b77b

Found in base branch: master

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


Step up your Open Source Security Game with Mend here

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions