Vulnerability · Published Jun 18, 2021 · Assigned by GitHub_M

CVE-2021-32696Passing in a non-string 'html' argument can lead to unsanitized output

Low 3.7

In plain English

A low-severity cross-site scripting in striptags from ericnorris. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 1.1% (higher than 65% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)3.7Low
Exploit odds (30 days)1.1%top 34.8% of all CVEs
Exploited in the wildNo reportsnot in CISA KEV
Attack toolingNoneno public tooling known

Official description

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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
npmstriptags3.2.0GHSA-qxg5-2qff-p49r

Affected products (as reported)

VendorProductVersions
ericnorris striptags < 3.2.0

Weakness: CWE-241, CWE-79 · Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N

References