The npm package "striptags" is an implementation of PHP's strip_tags in Typescript. In striptags before version 3.2.0, a type-confusion vulnerability can cause `striptags` to concatenate unsanitized strings when an array-like object is passed in as the `html` parameter. This can be abused by an attacker who can control the shape of their input, e.g. if query parameters are passed directly into the function. This can lead to a XSS.
CVE-2021-32696 - Medium Severity Vulnerability
Vulnerable Library - striptags-3.1.1.tgz
PHP strip_tags in Node.js
Library home page: https://registry.npmjs.org/striptags/-/striptags-3.1.1.tgz
Path to dependency file: dadbot/package.json
Path to vulnerable library: dadbot/node_modules/striptags/package.json
Dependency Hierarchy: - perspective-api-client-3.1.0.tgz (Root Library) - :x: **striptags-3.1.1.tgz** (Vulnerable Library)
Found in HEAD commit: c11022a7dce1aeb57a10362440a8d250763cc47d
Vulnerability Details
The npm package "striptags" is an implementation of PHP's strip_tags in Typescript. In striptags before version 3.2.0, a type-confusion vulnerability can cause `striptags` to concatenate unsanitized strings when an array-like object is passed in as the `html` parameter. This can be abused by an attacker who can control the shape of their input, e.g. if query parameters are passed directly into the function. This can lead to a XSS.
Publish Date: 2021-06-18
URL: CVE-2021-32696
CVSS 3 Score Details (5.3)
Base Score Metrics: - Exploitability Metrics: - Attack Vector: Network - Attack Complexity: Low - Privileges Required: None - User Interaction: None - Scope: Unchanged - Impact Metrics: - Confidentiality Impact: None - Integrity Impact: Low - Availability Impact: None
For more information on CVSS3 Scores, click here.Suggested Fix
Type: Upgrade version
Origin: https://github.com/ericnorris/striptags/security/advisories/GHSA-qxg5-2qff-p49r
Release Date: 2021-06-18
Fix Resolution: striptags - 3.2.0
Step up your Open Source Security Game with WhiteSource here