4.3 Medium
CVSS2
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
6.1 Medium
CVSS3
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
0.001 Low
EPSS
Percentile
43.9%
In league/commonmark
0.18.2 and below, malicious users can insert double-encoded HTML entities into their Markdown like this:
[XSS](javascript:alert%28'XSS'%29)
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:
<p><a href>XSS</a></p>
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
.
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).
CPE | Name | Operator | Version |
---|---|---|---|
league/commonmark | lt | 0.18.3 |
github.com/advisories/GHSA-3v43-877x-qgmq
github.com/FriendsOfPHP/security-advisories/blob/master/league/commonmark/CVE-2019-10010.yaml
github.com/thephpleague/commonmark/issues/353
github.com/thephpleague/commonmark/releases/tag/0.18.3
github.com/thephpleague/commonmark/security/advisories/GHSA-3v43-877x-qgmq
nvd.nist.gov/vuln/detail/CVE-2019-10010
4.3 Medium
CVSS2
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
6.1 Medium
CVSS3
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
0.001 Low
EPSS
Percentile
43.9%