Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. dompurify
  4. ›
  5. GHSA-x4vx-rjvf-j5p4

GHSA-x4vx-rjvf-j5p4: DOMPurify: `IN_PLACE` mode trusts attacker-controlled `nodeName` on live non-form nodes, allowing script retention and XSS via attacker-supplied DOM objects

June 15, 2026

When DOMPurify.sanitize(root, { IN_PLACE: true }) is called on an attacker-supplied live DOM node, DOMPurify still trusts currentNode.nodeName for non-form nodes in the main _sanitizeElements pipeline. A real <script> child node whose observable nodeName is attacker-controlled can therefore be misclassified as an allowed element and retained. When the sanitized tree is inserted into a live document, the script executes.

This affects current 3.4.6. The recent IN_PLACE hardening work covers clobbered form handling and foreign-realm shadow/template traversal, but does not harden the main per-node element decision for hostile non-form live nodes.

References

  • github.com/advisories/GHSA-x4vx-rjvf-j5p4
  • github.com/cure53/DOMPurify/security/advisories/GHSA-x4vx-rjvf-j5p4

Code Behaviors & Features

Detect and mitigate GHSA-x4vx-rjvf-j5p4 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions up to 3.4.6

Solution

Unfortunately, there is no solution available yet.

Weakness

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

Source file

npm/dompurify/GHSA-x4vx-rjvf-j5p4.yml

Spotted a mistake? Edit the file on GitLab.

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

Page generated Tue, 23 Jun 2026 12:22:58 +0000.