Lucene search

K
friendsofphpOpenJS FoundationFRIENDSOFPHP:EAGUE:COMMONMARK:CVE-2019-10010
HistoryMar 21, 2019 - 10:52 p.m.

XSS vulnerability with double-encoded entities

2019-03-2122:52:50
OpenJS Foundation
github.com
5

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.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

AI Score

6

Confidence

High

EPSS

0.001

Percentile

43.8%

An XSS vulnerability (CVE-2019-10010) has been identified in all previous versions of this library (0.18.2 and below). The issue has been fixed in version 0.18.3. All users should upgrade to version 0.18.3 immediately. Additionally, if your application caches the resulting HTML, please purge and/or regenerate those caches. Description In league/commonmark 0.18.2 and below, malicious users can insert double-encoded HTML entities into their Markdown like this: XSS This library would (correctly) unescape the & entity to & during the parsing step. However, the renderer step would fail to properly re-escape the resulting : string, thus producing the following malicious HTML output:

XSS

Browsers would interpret : as a : character and allow the JS to be executed when the link is clicked. This vulnerability was present in the upstream library this project was forked from and therefore exists in all prior versions of league/commonmark. Solution The new 0.18.3 release mirrors the fix made upstream - we no longer attempt to preserve entities when rendering HTML attributes like href, src, title, etc. The $preserveEntities parameter of Xml::escape() is therefore no longer used internally, so it has been deprecated and marked for removal in the next major release (0.19.0). Credits Mohit Fawaz for identifying the issue Sebastiaan Knijnenburg and Ross Tuck for responsibly disclosing/relaying the issue John MacFarlane for investigating it and implementing the upstream fix we mirrored here The text was updated successfully, but these errors were encountered: All reactions

Affected configurations

Vulners
Node
leaguecommonmarkRange<0.18.3
VendorProductVersionCPE
leaguecommonmark*cpe:2.3:a:league:commonmark:*:*:*:*:*:*:*:*

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.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

AI Score

6

Confidence

High

EPSS

0.001

Percentile

43.8%

Related for FRIENDSOFPHP:EAGUE:COMMONMARK:CVE-2019-10010