CVE-2021-32696

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

State
Published
Severity
3.7 Low
Published
Jun 18, 2021
Updated
Aug 3, 2024
Reserved
May 12, 2021

Read the record on cve.org

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.

Scores

CVSSScoreVectorSource
3.13.7 LowCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:NGitHub_M

Weaknesses

  • CWE-241 Improper Handling of Unexpected Data Type
  • CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Affected Products

ProductVersions
striptagsericnorris
  • < 3.2.0Affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.