CVE-2021-32696

Passing in a non-string 'html' argument can lead to unsanitized output

MEDIUM
5.3
CVSS Score
Published: June 18, 2021 at 07:35 PM UTC
Updated: June 17, 2026 at 03:53 AM UTC
2 products affected across 2 vendorsStriptagsProject Striptags

Using striptags by ericnorris?

Get instant alerts when new vulnerabilities affect striptags - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.3
Exploit prediction
EPSS 1%

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 3.2.0
Affected range stops below 3.2.0, so it looks safe — our inference, not a vendor statement
v < 3.2.0
Affected range stops below 3.2.0, so it looks safe — our inference, not a vendor statement

Remediation

No guide yet

No remediation guidance has been written for this CVE yet. What the record does show:

CVSS

Attack Vector
NETWORK
Complexity
LOW
Privileges
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
LOW
Availability
NONE
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-79CWE-241CWE-843

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card