Template Injection Affecting org.webjars.npm:dompurify package, versions [,2.5.0)[3.0.1,3.1.0)


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of concept

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-JAVA-ORGWEBJARSNPM-6474512
  • published11 Apr 2024
  • disclosed20 Mar 2024
  • creditRy0Tak

Introduced: 20 Mar 2024

CVE NOT AVAILABLE CWE-1336  (opens in a new tab)

How to fix?

Upgrade org.webjars.npm:dompurify to version 2.5.0, 3.1.0 or higher.

Overview

org.webjars.npm:dompurify is a DOM-only XSS sanitizer for HTML, MathML and SVG.

Affected versions of this package are vulnerable to Template Injection in purify.js, due to inconsistencies in the parsing of XML and HTML tags. Executable code can be injected in HTML inside XML CDATA blocks.

PoC

<![CDATA[ ><img src onerror=alert(1)> ]]>

CVSS Scores

version 3.1