Passing in a non-string 'html' argument can lead to unsanitized output
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Cross-site scripting
- Confidentiality · integrity · availability
- None · Low · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · NVD. Fix status from CNA and GitHub. Impact type from CWE-79.
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.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| ericnorris | striptags | before 3.2.0 | 3.2.0 | Patch available | CNA |
| — | striptags (npm) | before 3.2.0 | 3.2.0 | Patch available | GHSA-qxg5-2qff-p49r |
- striptags Vendorericnorris Affected before 3.2.0 Fixed in 3.2.0 Patch available CNA
- striptags (npm) Vendor— Affected before 3.2.0 Fixed in 3.2.0 Patch available GHSA-qxg5-2qff-p49r
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:striptags_project:striptags:*:*:*:*:*:node.js:*:* | before 3.2.0 | Vulnerable | Striptags Project |
- cpe:2.3:a:striptags_project:striptags:*:*:*:*:*:node.js:*:* Versions before 3.2.0 Vulnerable ·Striptags Project
Remediation
- Fix · CNA striptags (ericnorris) Fixed in 3.2.0
- Fix · GHSA-qxg5-2qff-p49r striptags (npm) Fixed in 3.2.0 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2021-32696
- 2026-10-03 Alias added: GHSA-qxg5-2qff-p49r
References
Sources
- CVE-2021-32696 · CVE Program
- CVE-2021-32696 · NVD
- FIRST EPSS
- GHSA-qxg5-2qff-p49r · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences