{"id":"CVE-2021-32696","aliases":["CVE-2021-32696","GHSA-qxg5-2qff-p49r"],"related":[],"kind":"vulnerability","state":"published","title":"Passing in a non-string 'html' argument can lead to unsanitized output","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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"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.\n\n### Impact\n\nXSS\n\n### Patches\n\n`3.2.0`\n\n### Workarounds\n\nEnsure that the `html` parameter is a string before calling the function.","format":"markdown","source":"ghsa"},{"lang":"es","text":"El paquete npm \"striptags\" es una implementación de strip_tags de PHP en Typescript. En striptags versiones anteriores a 3.2.0, una vulnerabilidad de confusión de tipos puede causar que \"striptags\" concatene cadenas no saneadas cuando es pasado un objeto tipo array como el parámetro \"html\". Esto puede ser abusado por un atacante que pueda controlar la forma de su entrada, por ejemplo, si los parámetros query son pasados directamente a la función. Esto puede conllevar una vulnerabilidad de tipo XSS","source":"nvd"}],"published":"2021-06-18T19:31:35.000Z","modified":"2026-07-08T06:28:10.431Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N","score":3.7,"rating":"LOW"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N","score":3.7,"rating":"LOW"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N","score":3.7,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","score":5.3,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:N/C:N/I:P/A:N","score":5,"rating":"MEDIUM"}],"cwes":["CWE-79","CWE-241","CWE-843"],"affected":[{"ranges":[{"version":"< 3.2.0","status":"affected"}],"vendor":"ericnorris","product":"striptags","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"3.2.0"}],"ecosystem":"npm","package":"striptags","purl":"pkg:npm/striptags","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"3.2.0"}],"vendor":"striptags_project","product":"striptags","cpe":"cpe:2.3:a:striptags_project:striptags:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/ericnorris/striptags/security/advisories/GHSA-qxg5-2qff-p49r","tags":["third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/ericnorris/striptags/commit/f252a6b0819499cd65403707ebaf5cc925f2faca","tags":["patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/ericnorris/striptags/releases/tag/v3.2.0","tags":["third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://www.npmjs.com/package/striptags","tags":["product","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-32696","tags":["advisory"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-32696","url":"https://www.cve.org/CVERecord?id=CVE-2021-32696","licence":"CVE Terms of Use","modified":"2024-08-03T23:25:31.066Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-qxg5-2qff-p49r","url":"https://github.com/advisories/GHSA-qxg5-2qff-p49r","licence":"CC-BY-4.0","modified":"2026-07-08T06:28:10.431Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-32696","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-32696","licence":"Public domain","modified":"2026-06-17T03:53:26.750Z"}],"updatedAt":"2026-11-25T22:58:02.011Z","epss":{"score":0.01079,"percentile":0.66061,"date":"2026-12-01T12:00:22.000Z"}}