Security advisory
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.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2021-32696
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 31 Oct 2026, 11:47 UTC · Revision 1
Source evidence
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.
osv:CVE-2021-32696
Complete source record
{
"id": "bb120e3abdc0f75ade244dfce4fd45c5b7b115ed0a999f0f76f39c5e8275d4a7",
"url": "https://osv.dev/vulnerability/CVE-2021-32696",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "CVE-2021-32696",
"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.",
"evidence": "osv:CVE-2021-32696",
"products": [],
"severity": "medium",
"structured": {
"id": "CVE-2021-32696",
"aliases": [
"CVE-2021-32696",
"GHSA-qxg5-2qff-p49r"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/ericnorris/striptags",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "f252a6b0819499cd65403707ebaf5cc925f2faca"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:striptags_project:striptags:*:*:*:*:*:node.js:*:*",
"range": [
{
"introduced": "0"
},
{
"fixed": "3.2.0"
}
],
"source": "CPE_RANGE"
},
{
"range": [
{
"fixed": "f252a6b0819499cd65403707ebaf5cc925f2faca"
}
],
"source": "REFERENCES_COMMIT"
},
{
"range": [
{
"fixed": "f252a6b0819499cd65403707ebaf5cc925f2faca"
}
],
"source": "REFERENCES_TAG",
"original_tag": "v3.2.0"
}
]
}
}
],
"versions": [
"v3.1.1",
"v3.1.0",
"v3.0.1",
"v3.0.0",
"v2.2.1",
"v2.1.2",
"v2.1.1",
"v2.1.0",
"v2.0.4",
"v2.0.3",
"v2.0.2",
"v2.0.1",
"v2.0.0",
"v1.0.0"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-32696.json"
}
}
],
"modified": "2026-10-20T10:54:42.819912839Z",
"provider": "osv",
"references": [
"https://github.com/ericnorris/striptags/releases/tag/v3.2.0",
"https://github.com/ericnorris/striptags/security/advisories/GHSA-qxg5-2qff-p49r",
"https://www.npmjs.com/package/striptags",
"https://github.com/ericnorris/striptags/commit/f252a6b0819499cd65403707ebaf5cc925f2faca"
],
"provider_metadata": {}
},
"related_cves": [
{
"value": "CVE-2021-32696",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 385965,
"published_at": "2021-06-18T20:15:07.633+00:00"
}