Lucene search

K
githubGitHub Advisory DatabaseGHSA-8J9V-H2VP-2HHV
HistoryJan 04, 2021 - 6:22 p.m.

XSS in HtmlSanitizer

2021-01-0418:22:11
CWE-74
CWE-79
GitHub Advisory Database
github.com
34
xss
htmlsanitizer
script execution
vulnerability
<style> tag
version 5.0.372
securitum
advisory

CVSS2

4.3

Attack Vector

NETWORK

Attack Complexity

MEDIUM

Authentication

NONE

Confidentiality Impact

NONE

Integrity Impact

PARTIAL

Availability Impact

NONE

AV:N/AC:M/Au:N/C:N/I:P/A:N

CVSS3

6.1

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

NONE

User Interaction

REQUIRED

Scope

CHANGED

Confidentiality Impact

LOW

Integrity Impact

LOW

Availability Impact

NONE

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

EPSS

0.001

Percentile

46.3%

Impact

If you have explicitly allowed the &lt;style&gt; tag, an attacker could craft HTML that includes script after passing through the sanitizer. The default settings disallow the &lt;style&gt; tag so there is no risk if you have not explicitly allowed the &lt;style&gt; tag.

Patches

The problem has been fixed in version 5.0.372.

Workarounds

Remove the &lt;style&gt; tag from the set of allowed tags.

For more information

If you have any questions or comments about this advisory open an issue in https://github.com/mganss/HtmlSanitizer

Credits

This issue was discovered by Michal Bentkowski of Securitum.

Affected configurations

Vulners
Node
htmlsanitizer_projecthtmlsanitizerRange<5.0.372
VendorProductVersionCPE
htmlsanitizer_projecthtmlsanitizer*cpe:2.3:a:htmlsanitizer_project:htmlsanitizer:*:*:*:*:*:*:*:*

CVSS2

4.3

Attack Vector

NETWORK

Attack Complexity

MEDIUM

Authentication

NONE

Confidentiality Impact

NONE

Integrity Impact

PARTIAL

Availability Impact

NONE

AV:N/AC:M/Au:N/C:N/I:P/A:N

CVSS3

6.1

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

NONE

User Interaction

REQUIRED

Scope

CHANGED

Confidentiality Impact

LOW

Integrity Impact

LOW

Availability Impact

NONE

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

EPSS

0.001

Percentile

46.3%

Related for GHSA-8J9V-H2VP-2HHV