GHSA-vhv4-fh94-jm5x

Suggest an improvement
Source
https://github.com/advisories/GHSA-vhv4-fh94-jm5x
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/03/GHSA-vhv4-fh94-jm5x/GHSA-vhv4-fh94-jm5x.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-vhv4-fh94-jm5x
Aliases
Published
2025-03-14T19:54:52Z
Modified
2025-03-14T21:41:26Z
Severity
  • 6.9 (Medium) CVSS_V4 - CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N CVSS Calculator
Summary
JS Html Sanitizer allows XSS when used with contentEditable
Details

Impact

XSS vulnerability when the sanitizer is used with a contentEditable element to set the elements innerHTML to a sanitized string produced by the package. If the code is particularly crafted to abuse the code beautifier, that runs AFTER sanitation.

Patches

Patched in version 2.0.3

Database specific
{
    "nvd_published_at": "2025-03-14T19:15:48Z",
    "cwe_ids": [
        "CWE-79"
    ],
    "severity": "MODERATE",
    "github_reviewed": true,
    "github_reviewed_at": "2025-03-14T19:54:52Z"
}
References

Affected packages

npm / @jitbit/htmlsanitizer

Package

Name
@jitbit/htmlsanitizer
View open source insights on deps.dev
Purl
pkg:npm/%40jitbit/htmlsanitizer

Affected ranges

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