Vulnerability Details : CVE-2021-32696
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.
Vulnerability category: Cross site scripting (XSS)
Products affected by CVE-2021-32696
- cpe:2.3:a:striptags_project:striptags:*:*:*:*:*:node.js:*:*
Exploit prediction scoring system (EPSS) score for CVE-2021-32696
0.13%
Probability of exploitation activity in the next 30 days
EPSS Score History
~ 47 %
Percentile, the proportion of vulnerabilities that are scored at or less
CVSS scores for CVE-2021-32696
Base Score | Base Severity | CVSS Vector | Exploitability Score | Impact Score | Score Source | First Seen |
---|---|---|---|---|---|---|
5.0
|
MEDIUM | AV:N/AC:L/Au:N/C:N/I:P/A:N |
10.0
|
2.9
|
NIST | |
5.3
|
MEDIUM | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N |
3.9
|
1.4
|
NIST | |
3.7
|
LOW | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N |
2.2
|
1.4
|
GitHub, Inc. |
CWE ids for CVE-2021-32696
-
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.Assigned by: security-advisories@github.com (Secondary)
-
The product does not handle or incorrectly handles when a particular element is not the expected type, e.g. it expects a digit (0-9) but is provided with a letter (A-Z).Assigned by: security-advisories@github.com (Secondary)
-
The product allocates or initializes a resource such as a pointer, object, or variable using one type, but it later accesses that resource using a type that is incompatible with the original type.Assigned by: nvd@nist.gov (Primary)
References for CVE-2021-32696
-
https://github.com/ericnorris/striptags/releases/tag/v3.2.0
Release v3.2.0 · ericnorris/striptags · GitHubThird Party Advisory
-
https://github.com/ericnorris/striptags/security/advisories/GHSA-qxg5-2qff-p49r
Passing in a non-string 'html' argument can lead to unsanitized output · Advisory · ericnorris/striptags · GitHubThird Party Advisory
-
https://www.npmjs.com/package/striptags
striptags - npmProduct;Third Party Advisory
-
https://github.com/ericnorris/striptags/commit/f252a6b0819499cd65403707ebaf5cc925f2faca
Merge pull request from GHSA-qxg5-2qff-p49r · ericnorris/striptags@f252a6b · GitHubPatch;Third Party Advisory
Jump to