CVE-2021-32696 Details
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.
A type-confusion vulnerability has been identified in the npm package 'striptags', which is a TypeScript implementation of PHP's strip_tags function. This vulnerability exists in versions prior to 3.2.0. The issue arises when an array-like object is passed as the 'html' parameter, allowing an attacker to manipulate the input and cause 'striptags' to concatenate unsanitized strings. This could lead to cross-site scripting (XSS) attacks, especially if query parameters are directly fed into the function.
Users can upgrade to version 3.2.0 or later to address this vulnerability.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
No SSVC data is available for this CVE.
References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/ericnorris/striptags/commit/f252a6b0819499cd65403707ebaf5cc925f2faca | CVE | PatchThird Party Advisory |
| https://github.com/ericnorris/striptags/releases/tag/v3.2.0 | CVE | Third Party Advisory |
| https://github.com/ericnorris/striptags/security/advisories/GHSA-qxg5-2qff-p49r | CVE | Third Party Advisory |
| https://www.npmjs.com/package/striptags | CVE | ProductThird Party Advisory |
| https://github.com/ericnorris/striptags/commit/f252a6b0819499cd65403707ebaf5cc925f2faca | [email protected] | PatchThird Party Advisory |
| https://github.com/ericnorris/striptags/releases/tag/v3.2.0 | [email protected] | Third Party Advisory |
| https://github.com/ericnorris/striptags/security/advisories/GHSA-qxg5-2qff-p49r | [email protected] | Third Party Advisory |
| https://www.npmjs.com/package/striptags | [email protected] | ProductThird Party Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-843 | Access of Resource Using Incompatible Type ('Type Confusion') | [email protected] |
| CWE-241 | Improper Handling of Unexpected Data Type | [email protected] |
| CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| striptags project striptags | < 3.2.0 |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Nov 21, 2024 | CVE Modified | CVE |
| May 14, 2024 | CVE Modified | [email protected] |
| Jun 24, 2021 | Initial Analysis | [email protected] |