CVE-2021-32696 json
Passing in a non-string 'html' argument can lead to unsanitized output
published 2021-06-18 5 y ago modified 2026-07-08 4 mo ago also GHSA-qxg5-2qff-p49r , EUVD-2021-1388
- cvss
- 3.7
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.1%
- EPSS 1.1% chance of exploitation in 30 days, percentile 65%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- npm striptags 3.2.0
- striptags_project striptags 3.2.0
Exploit prediction
1.08% chance of exploitation in the next 30 days, higher than 65% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 3.7 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N |
| NVD | 3.1 | 5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N |
| NVD | 2.0 | 5.0 | AV:N/AC:L/Au:N/C:N/I:P/A:N |
| GitHub | 3.1 | 3.7 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| npm | striptags | <3.2.0 |
3.2.0 |
Affected products
- ericnorris striptags
Classification
References
-
github.com
/ericnorris/striptags/commit/f252a6b0819499cd65403707ebaf5cc925f2faca
web, patch, third-party-advisory
-
github.com
/ericnorris/striptags/security/advisories/GHSA-qxg5-2qff-p49r
web, third-party-advisory
-
github.com
/ericnorris/striptags/releases/tag/v3.2.0
web, third-party-advisory
-
npmjs.com
/package/striptags
web, product, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2021-32696
advisory
Sources
- CVE List CVE-2021-32696
- GitHub Advisory GHSA-qxg5-2qff-p49r
- NVD CVE-2021-32696
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.