Cross-site Scripting (XSS) Affecting shave package, versions <2.5.3


Severity

Recommended
0.0
high
0
10

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

Threat Intelligence

EPSS
0.07% (34th 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 IDSNYK-JS-SHAVE-174318
  • published15 Apr 2019
  • disclosed12 Apr 2019
  • creditdigitalcraft

Introduced: 12 Apr 2019

CVE-2019-12313  (opens in a new tab)
CWE-79  (opens in a new tab)

How to fix?

Upgrade shave to version 2.5.3 or higher.

Overview

shave is a zero dependency JavaScript plugin that truncates multi-line text to fit within an html element based on a set pixel number max-height.

Affected versions of this package are vulnerable to Cross-site Scripting (XSS) due to the usage of the insertAdjacentHTML method within an element interface which could fetch possible user input from the innerText property under certain conditions.

Details

CVSS Scores

version 3.1