GHSA-mjxr-4v3x-q3m4

Suggest an improvement
Source
https://github.com/advisories/GHSA-mjxr-4v3x-q3m4
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2021/05/GHSA-mjxr-4v3x-q3m4/GHSA-mjxr-4v3x-q3m4.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-mjxr-4v3x-q3m4
Aliases
Published
2021-05-06T16:10:19Z
Modified
2023-11-08T04:05:21Z
Severity
  • 5.3 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N CVSS Calculator
Summary
Improper Input Validation in sanitize-html
Details

Apostrophe Technologies sanitize-html before 2.3.2 does not properly validate the hostnames set by the "allowedIframeHostnames" option when the "allowIframeRelativeUrls" is set to true, which allows attackers to bypass hostname whitelist for iframe element, related using an src value that starts with "/\example.com".

Database specific
{
    "cwe_ids":  [
        "CWE-20"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2021-03-29T23:13:11Z",
    "nvd_published_at":  "2021-02-08T17:15:00Z",
    "severity":  "MODERATE"
}
References

Affected packages

npm / sanitize-html

Package

Name
sanitize-html
View open source insights on deps.dev
Purl
pkg:npm/sanitize-html

Affected ranges

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

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2021/05/GHSA-mjxr-4v3x-q3m4/GHSA-mjxr-4v3x-q3m4.json"