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.test.osv.dev/v1/vulns/GHSA-mjxr-4v3x-q3m4
Aliases
Published
2021-05-06T16:10:19Z
Modified
2026-01-06T15:12:08.166728Z
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_at": "2021-03-29T23:13:11Z",
    "nvd_published_at": "2021-02-08T17:15:00Z",
    "github_reviewed": true,
    "severity": "MODERATE"
}
References

Affected packages

npm / sanitize-html

Package

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown 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"