Advisory

GHSA-qxg5-2qff-p49r

Also known as: CVE-2021-32696

Summary

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

Details

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.

Impact

XSS

Patches

3.2.0

Workarounds

Ensure that the html parameter is a string before calling the function.

Severity

Medium Basis: The source's own band: MODERATE

Dates

Published
2021-06-18 19:31 UTC
Modified
2026-07-08 06:28 UTC

Affected packages and fixes

striptags

npm · All systems

Affected

  • introduced 0, fixed 3.2.0 (semver)

Fixed versions

3.2.0

Fix

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences