CVE-2019-25155: DOMPurify Open Redirect vulnerability in dompurify

dompurify Updated 02 Oct 2025

Summary

14/11/2023
Yes i
Moderate
6.1

CVE-2019-25155: DOMPurify Open Redirect vulnerability. Affects dompurify versions < 1.0.11. Fixed in 1.0.11. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

DOMPurify is an open-source JavaScript library that provides a secure way to sanitize HTML and prevent cross-site scripting (XSS) attacks. It is commonly used in web applications to sanitize user-generated content before rendering it in the browser. However, a vulnerability has been discovered in versions prior to 1.0.11 that allows for reverse tabnabbing in certain scenarios.

Vulnerability Detail

The vulnerability in DOMPurify arises from the lack of a 'rel="noopener noreferrer"' attribute in links in the demos/hooks-target-blank-demo.html file. This omission enables an attacker to perform a reverse tabnabbing attack, where a malicious website can manipulate the target of a link opened in a new tab or window. This can lead to various security risks, such as phishing attacks or the execution of malicious code in the context of the target website.

How To Fix

Latest published version: 3.4.17 as of 22 Oct 2026

npm install dompurify@3.4.17

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

1.0.11

This is the first release that contains the fix.

npm install dompurify@1.0.11

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If updating the package is not immediately feasible, a temporary workaround is to manually add the 'rel="noopener noreferrer"' attribute to the affected links in the demos/hooks-target-blank-demo.html file. The following code snippet demonstrates how to add the attribute to an anchor element:

<a href="https://example.com" target="_blank" rel="noopener noreferrer">Link</a>

Conclusion

The DOMPurify Open Redirect vulnerability in dompurify can be mitigated by updating the package to version 1.0.11 or later. This update includes the necessary attribute to prevent reverse tabnabbing attacks. If immediate updating is not possible, manually adding the attribute to the affected links can serve as a temporary workaround. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for dompurify →

Share this vulnerability

FAQ

DOMPurify is a JavaScript library that sanitizes HTML and prevents cross-site scripting (XSS) attacks by removing potentially dangerous elements and attributes from user-generated content.

Reverse tabnabbing is a type of attack where a malicious website manipulates the target of a link opened in a new tab or window. This can be used for phishing attacks or executing malicious code in the context of the target website.

The vulnerability allows an attacker to perform reverse tabnabbing attacks on applications that use DOMPurify. This can lead to security risks such as phishing attacks or the execution of malicious code in the context of the target website.

To fix the vulnerability, update the DOMPurify package to version 1.0.11 or later. Alternatively, manually add the 'rel="noopener noreferrer"' attribute to the affected links in the demos/hooks-target-blank-demo.html file.

Yes, you can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability. Vulert monitors and alerts in real-time for open-source vulnerabilities without requiring access to the code or installation.

Related vulnerabilities

Recent vulnerabilities recorded for dompurify.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

Latest published version: 3.4.17 as of 22 Oct 2026

npm install dompurify@3.4.17

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

1.0.11

This is the first release that contains the fix.

npm install dompurify@1.0.11

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback