Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. dompurify
  4. ›
  5. CVE-2025-26791

CVE-2025-26791: DOMPurify allows Cross-site Scripting (XSS)

February 14, 2025 (updated June 30, 2025)

DOMPurify before 3.2.4 has an incorrect template literal regular expression when SAFE_FOR_TEMPLATES is set to true, sometimes leading to mutation cross-site scripting (mXSS).

References

  • ensy.zip/posts/dompurify-323-bypass
  • github.com/advisories/GHSA-vhxf-7vqr-mrjg
  • github.com/cure53/DOMPurify
  • github.com/cure53/DOMPurify/commit/d18ffcb554e0001748865da03ac75dd7829f0f02
  • github.com/cure53/DOMPurify/releases/tag/3.2.4
  • nsysean.github.io/posts/dompurify-323-bypass
  • nvd.nist.gov/vuln/detail/CVE-2025-26791

Code Behaviors & Features

Detect and mitigate CVE-2025-26791 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions before 3.2.4

Fixed versions

  • 3.2.4

Solution

Upgrade to version 3.2.4 or above.

Impact 4.5 MEDIUM

CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Source file

npm/dompurify/CVE-2025-26791.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:16:16 +0000.