CVE-2021-32696
MEDIUM 5.3CVSS 3.1Passing in a non-string 'html' argument can lead to unsanitized output
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.
- Published
- 18 Jun 2021
- Last modified
- 8 Jul 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Modified
- Weakness
- CWE-241CWE-79CWE-843
- Also known as
- GHSA-qxg5-2qff-p49r
- Sources
- NVDJSONOSV GHSA-qxg5-2qff-p49rJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | MEDIUM 5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N |
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | LOW 3.7 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N |
| OSV | GitHub | CVSS 3.1 | LOW 3.7 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | MEDIUM 5.0 | AV:N/AC:L/Au:N/C:N/I:P/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | striptags_project | striptagscpe:2.3:a:striptags_project:striptags:*:*:*:*:*:node.js:*:* |
< 3.2.0 | 3.2.0 |
| OSV | npm | striptags | < 3.2.0 | 3.2.0 |
References
- https://github.com/ericnorris/striptags/commit/f252a6b0819499cd65403707ebaf5cc925f2faca · Patch, Third Party Advisory, WEB
- https://github.com/ericnorris/striptags/releases/tag/v3.2.0 · Third Party Advisory, WEB
- https://github.com/ericnorris/striptags/security/advisories/GHSA-qxg5-2qff-p49r · Third Party Advisory, WEB
- https://www.npmjs.com/package/striptags · Product, Third Party Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2021-32696 · ADVISORY
History
- 25 Nov 2026 20:33 UTC · NVD: first stored (published 18 Jun 2021)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 18 Jun 2021)