CVE-2019-10010
mediumpriority · track · 24EPSS 0.011 · 64 %ileEUUSEPSS · scored 2026-10-27
Cross-site scripting (XSS) vulnerability in the PHP League CommonMark library before 0.18.3 allows remote attackers to insert unsafe links into HTML by using double-encoded HTML entities that are not properly escaped during rendering, a different vulnerability than CVE-2018-20583.
cvss
Technical severity, 0–10. One row per scoring source.
base score 0–10 · higher = more severe · hover a vector to decode
weaknesses
The CWE weakness classes this flaw belongs to.
affected products (3)
Products and version ranges known to be affected.
advisories (1)
Vendor and ecosystem advisories describing this.
- GHSA-3v43-877x-qgmqModerate severity vulnerability that affects league/commonmark2019-09-17ghsa · osvUS
## CVE-2019-10010 ### Impact In `league/commonmark` 0.18.2 and below, malicious users can insert double-encoded HTML entities into their Markdown like this: ```md [XSS](javascript&colon;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: ```html <p><a href="javascript:alert('XSS')">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`. ### Solution The new [0.18.3](https://github.com/thephpleague/commonmark/releases/tag/0.18.3) release mirrors [the fix made upstream](https://github.com/commonmark/commonmark.js/commit/c89b35c5fc99bdf1d2181f7f0c9fcb8a1abc27c8) - 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 ### References - https://nvd.nist.gov/vuln/detail/CVE-2019-10010 - https://github.com/thephpleague/commonmark/releases/tag/0.18.3 - https://github.com/thephpleague/commonmark/issues/353 - https://github.com/FriendsOfPHP/security-advisories/blob/master/league/commonmark/CVE-2019-10010.yaml
also known as (3)
Other names and identifiers for this entity.
sources
Which sources assert this record, and when.
references (7)
External citations — patches, advisories, analysis.
- https://github.com/thephpleague/commonmark/issues/353cnnvd
- https://github.com/thephpleague/commonmark/releases/tag/0.18.3cnnvd
- https://nvd.nist.gov/vuln/detail/CVE-2019-10010cnnvd
- https://github.com/thephpleague/commonmark/issues/353enisa_euvd
- https://github.com/thephpleague/commonmark/releases/tag/0.18.3enisa_euvd
- https://github.com/thephpleague/commonmark/issues/353ExploitIssue TrackingPatchThird Party Advisorynvd
- https://github.com/thephpleague/commonmark/releases/tag/0.18.3Release NotesThird Party Advisorynvd
Attackers weaponise vulnerabilities like this against internet-exposed services. See what is exposed on your perimeter with a free passive scan.
Free scan