Cross-site Scripting (XSS) Affecting sanitize-html package, versions <1.2.3


Severity

Recommended
0.0
medium
0
10

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

Threat Intelligence

EPSS
0.12% (47th percentile)

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 Learn

Learn about Cross-site Scripting (XSS) vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDnpm:sanitize-html:20140717
  • published16 Apr 2017
  • disclosed17 Jul 2014
  • creditJim O'Brien

Introduced: 17 Jul 2014

CVE-2017-16017  (opens in a new tab)
CWE-79  (opens in a new tab)

How to fix?

Upgrade sanitize-html to version 1.2.3 or higher.

Overview

sanitize-html is a library for scrubbing html input of malicious values.

Affected versions of this package are vulnerable to Cross-site Scripting (XSS) due to unescaped double quotes.

Entering the following:

<IMG SRC= onmouseover="alert('XSS');">

produces the following:

<img src="onmouseover="alert('XSS');"" />

Details

<>

CVSS Scores

version 3.1