Critical Vulnerability in node-dompurify: CVE-2026-41238

node-dompurify Updated 22 Oct 2026

Summary

23/04/2026
N/A
No i
Unrated
Not published

DEBIAN-CVE-2026-41238: ... Affects node-dompurify versions 2.4.1+dfsg+~2.4.0-1 – 3.3.3+dfsg-2. No fix is published. 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 Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

node-dompurify is a popular JavaScript library used for sanitizing HTML and preventing XSS (Cross-Site Scripting) attacks. It is widely utilized in web applications to ensure that user-generated content is safe for rendering in browsers. The library is designed to allow developers to clean potentially harmful HTML while preserving safe content. However, recent findings have revealed a vulnerability that could compromise the security of applications using this package.

Vulnerability Detail

CVE-2026-41238 is a critical vulnerability affecting all versions of node-dompurify. The vulnerability originates from improper input validation, which could allow an attacker to inject malicious scripts into sanitized HTML. This could lead to severe consequences, including unauthorized access to sensitive data, session hijacking, or complete takeover of the affected web application. The vulnerability is particularly concerning for applications that rely heavily on user-generated content, as it undermines the core purpose of the library.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

If you are unable to update the package immediately, consider implementing input validation on your own to sanitize user inputs before passing them to node-dompurify. This can help mitigate the risk of XSS attacks until a proper update can be applied. Additionally, you can limit the types of HTML elements and attributes that are allowed in user-generated content.

Conclusion

The CVE-2026-41238 vulnerability in node-dompurify poses a significant risk to applications that rely on this package for sanitizing HTML. It is crucial to update to the latest version to protect against potential XSS attacks. Implementing workarounds can provide temporary relief, but a permanent fix through an update is strongly recommended.

See every vulnerability recorded for node-dompurify →

Share this vulnerability

FAQ

CVE-2026-41238 is a critical vulnerability in the node-dompurify package that allows attackers to inject malicious scripts into sanitized HTML.

If your application uses node-dompurify, it may be at risk of XSS attacks, which could lead to unauthorized access to sensitive data or complete control over the application.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

Implement input validation on user inputs to mitigate risks, and consider limiting allowed HTML elements and attributes until you can update the package.

You can find more information about node-dompurify on its official GitHub repository or documentation page.

Related vulnerabilities

Recent vulnerabilities recorded for node-dompurify.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. 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