GHSA-qxg5-2qff-p49r

Suggest an improvement
Source
https://github.com/advisories/GHSA-qxg5-2qff-p49r
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2021/06/GHSA-qxg5-2qff-p49r/GHSA-qxg5-2qff-p49r.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-qxg5-2qff-p49r
Aliases
Published
2021-06-18T19:31:35Z
Modified
2026-05-07T05:02:58Z
Severity
  • 3.7 (Low) CVSS_V3 - CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N CVSS Calculator
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.

Database specific
{
    "cwe_ids":  [
        "CWE-241",
        "CWE-79",
        "CWE-843"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2021-06-18T19:31:21Z",
    "nvd_published_at":  "2021-06-18T20:15:00Z",
    "severity":  "MODERATE"
}
References

Affected packages

npm / striptags

Package

Affected ranges

Type
SEMVER
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Fixed
3.2.0

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2021/06/GHSA-qxg5-2qff-p49r/GHSA-qxg5-2qff-p49r.json"