{"id":"CVE-2021-32696","published":"2021-06-18T19:35:13Z","modified":"2024-08-03T23:25:31Z","title":"Passing in a non-string 'html' argument can lead to unsanitized output","vendor":"ericnorris","product":"striptags","tier":"tail","description":{"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":3.7,"severity":"LOW","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01079,"percentile":0.65938,"provenance":"source"},"cwes":[{"id":"CWE-241","name":"Improper Handling of Unexpected Data Type"},{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"references":[{"url":"https://github.com/ericnorris/striptags/security/advisories/GHSA-qxg5-2qff-p49r","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/ericnorris/striptags/commit/f252a6b0819499cd65403707ebaf5cc925f2faca","tags":["x_refsource_MISC"]},{"url":"https://github.com/ericnorris/striptags/releases/tag/v3.2.0","tags":["x_refsource_MISC"]},{"url":"https://www.npmjs.com/package/striptags","tags":["x_refsource_MISC"]}],"priority":{"score":15.8,"factors":[{"name":"EPSS percentile","points":13.19},{"name":"CVSS severity","points":2.59}]},"vendorSlug":"ericnorris","affectedVersions":[{"vendor":"ericnorris","product":"striptags","versions":["< 3.2.0"]}],"affected":[{"ecosystem":"npm","package":"striptags","vulnerableRanges":["<3.2.0"],"patched":["3.2.0"],"from":["GHSA-qxg5-2qff-p49r"],"provenance":"source"}],"summary":{"text":"The striptags npm package, an TypeScript implementation of PHP's strip_tags, contains a type-confusion flaw in versions before 3.2.0 where passing an array-like object as the html argument causes unsanitized strings to be concatenated into the output.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:33:17Z"},"euvd":{"id":"EUVD-2021-1388","exploited":false,"provenance":"source"}}