Moderate severity vulnerability that affects league/commonmark
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:
[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="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 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
References
Software afectado
Haz clic en una tecnología para ver todas sus vulnerabilidades.
| Plataforma | Paquete | Versiones vulnerables | Corregida en |
|---|---|---|---|
| Paquete de Composer | league/commonmark | < 0.18.3 | 0.18.3 |
Referencias
- https://github.com/thephpleague/commonmark/security/advisories/GHSA-3v43-877x-qgmq
- https://nvd.nist.gov/vuln/detail/CVE-2019-10010
- https://github.com/thephpleague/commonmark/issues/353
- https://github.com/FriendsOfPHP/security-advisories/blob/master/league/commonmark/CVE-2019-10010.yaml
- https://github.com/advisories/GHSA-3v43-877x-qgmq
- https://github.com/thephpleague/commonmark
- https://github.com/thephpleague/commonmark/releases/tag/0.18.3
- Vector CVSS
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N- Debilidad (CWE)
CWE-79- Plataforma
- Composer
- Paquete
league/commonmark- Publicada
- 17.09.2019
- Actualizado
- 11.10.2026 10:22
Fuentes y licencias
OSV / GitHub Advisory Database - GHSA-3v43-877x-qgmq - CC BY 4.0
Historial de vulnerabilidades: league/commonmark
Todas las vulnerabilidades publicadas de este paquete (Paquete de Composer), de la más reciente a la más antigua. Muestra si es un fallo aislado o un paquete que hay que vigilar.
- Entradas en total
- 18
- Primera → última
- 09.2019 09.2026
- Sin corrección
- 0
- Explotada en ataques
- 0
Distribución por gravedad
- Alta 10
- Media 8
Divulgaciones por año
- 2019: 1
- 2020: 0
- 2021: 0
- 2022: 1
- 2023: 0
- 2024: 1
- 2025: 1
- 2026: 14
-
Moderate severity vulnerability that affects league/commonmark esta entrada
Identifica las vulnerabilidades de tu aplicación
Con la integración de DockRay y el inventario de software activado, DockRay compara las versiones notificadas de los componentes con las vulnerabilidades conocidas y avisa de las coincidencias confirmadas. La cobertura depende de la tecnología compatible y de los avisos disponibles.