CVEvulnerability

CVE-2021-32696

5.3 MEDIUM Published 2021-06-18 Modified 2026-06-17 Official page ↗
Status
Modified
Published
2021-06-18
Last modified
2026-06-17
Assigner
[email protected]
CVSS 3.1 ([email protected])
3.7 LOW — CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N
CVSS 3.1 ([email protected])
5.3 MEDIUM — CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
CVSS 2.0 ([email protected])
5.0 MEDIUM — AV:N/AC:L/Au:N/C:N/I:P/A:N
Weaknesses
CWE-241, CWE-79, CWE-843

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 configurations

• striptags project striptags (< 3.2.0)

Related

Weakness · CWE (3)

  • CWE-241 Improper Handling of Unexpected Data Type weakness
  • CWE-79 Improper Neutralization of Input During Web Page Generation weakness
  • CWE-843 Access of Resource Using Incompatible Type weakness

References