Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. striptags
  4. ›
  5. CVE-2021-32696

CVE-2021-32696: Access of Resource Using Incompatible Type (Type Confusion)

June 18, 2021 (updated June 24, 2021)

The npm package striptags is an implementation of PHP’s strip_tags in Typescript. In striptags, 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.

References

  • nvd.nist.gov/vuln/detail/CVE-2021-32696

Code Behaviors & Features

Detect and mitigate CVE-2021-32696 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 3.2.0

Fixed versions

  • 3.2.0

Solution

Upgrade to version 3.2.0 or above.

Impact 5.3 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-843: Access of Resource Using Incompatible Type ('Type Confusion')

Source file

npm/striptags/CVE-2021-32696.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:14:59 +0000.