{"id":"CVE-2019-10010","aliases":["CVE-2019-10010","GHSA-3v43-877x-qgmq"],"related":[],"kind":"vulnerability","state":"published","title":"Moderate severity vulnerability that affects league/commonmark","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"## CVE-2019-10010\n\n### Impact\n\nIn `league/commonmark` 0.18.2 and below, malicious users can insert double-encoded HTML entities into their Markdown like this:\n\n```md\n[XSS](javascript&amp;colon;alert%28&#039;XSS&#039;%29)\n```\n\nThis library would (correctly) unescape the `&amp;` entity to `&` during the parsing step.  However, **the renderer step would fail to properly re-escape the resulting `&colon;` string**, thus producing the following malicious HTML output:\n\n```html\n<p><a href=\"javascript&colon;alert('XSS')\">XSS</a></p>\n```\n\nBrowsers would interpret `&colon;` as a `:` character and allow the JS to be executed when the link is clicked.\n\nThis vulnerability was present in the upstream library this project was forked from and therefore exists in all prior versions of `league/commonmark`.\n\n### Solution\n\nThe 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.\n\nThe `$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).\n\n### Credits\n\n - Mohit Fawaz for identifying the issue\n - Sebastiaan Knijnenburg and Ross Tuck for responsibly disclosing/relaying the issue\n - John MacFarlane for investigating it and implementing the upstream fix we mirrored here\n\n### References\n\n - https://nvd.nist.gov/vuln/detail/CVE-2019-10010\n - https://github.com/thephpleague/commonmark/releases/tag/0.18.3\n - https://github.com/thephpleague/commonmark/issues/353\n- https://github.com/FriendsOfPHP/security-advisories/blob/master/league/commonmark/CVE-2019-10010.yaml","format":"markdown","source":"ghsa"},{"lang":"es","text":"Vulnerabilidad Cross-Site Scripting (XSS) en la librería PHP League CommonMark, en versiones anteriores a la 0.18.3, permite que los atacantes remotos inserten enlaces inseguros en HTML mediante el uso de entidades HTML doblemente cifradas que no se escapan correctamente durante el renderizado. Esta vulnerabilidad es diferente de CVE-2018-20583.","source":"nvd"}],"published":"2019-03-24T17:58:54.000Z","modified":"2026-06-17T02:10:01.933Z","severity":{"scorer":"NVD","scheme":"CVSS:3.0","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub","scheme":"CVSS:3.0","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.0","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:M/Au:N/C:N/I:P/A:N","score":4.3,"rating":"MEDIUM"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.18.3"}],"ecosystem":"Packagist","package":"league/commonmark","purl":"pkg:composer/league/commonmark","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"0.18.3"}],"vendor":"thephpleague","product":"commonmark","cpe":"cpe:2.3:a:thephpleague:commonmark:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/thephpleague/commonmark/issues/353","tags":["exploit","issue-tracking","patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/thephpleague/commonmark/releases/tag/0.18.3","tags":["release-notes","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/thephpleague/commonmark/security/advisories/GHSA-3v43-877x-qgmq","tags":["web"],"sources":["ghsa"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2019-10010","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/FriendsOfPHP/security-advisories/blob/master/league/commonmark/CVE-2019-10010.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/advisories/GHSA-3v43-877x-qgmq","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/thephpleague/commonmark","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"mitre","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2019-10010","url":"https://www.cve.org/CVERecord?id=CVE-2019-10010","licence":"CVE Terms of Use","modified":"2024-08-04T22:10:08.687Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-3v43-877x-qgmq","url":"https://github.com/advisories/GHSA-3v43-877x-qgmq","licence":"CC-BY-4.0","modified":"2024-02-16T08:15:08.451Z"},{"source":"nvd","name":"NVD","id":"CVE-2019-10010","url":"https://nvd.nist.gov/vuln/detail/CVE-2019-10010","licence":"Public domain","modified":"2026-06-17T02:10:01.933Z"}],"updatedAt":"2026-11-25T22:57:44.128Z","epss":{"score":0.0105,"percentile":0.65201,"date":"2026-12-01T12:00:22.000Z"}}