PHP League CommonMark vulnerable to Cross-Site Scripting (XSS)
Cross-site scripting (XSS) vulnerability in the PHP League CommonMark library versions 0.15.6 through 0.18.x before 0.18.1 allows remote attackers to insert unsafe URLs into HTML (even if allow_unsafe_links is false) via a newline character (e.g., writing javascript as javascri%0apt).
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| Composer package | league/commonmark | >= 0.15.6, < 0.18.1 | 0.18.1 |
References
- https://nvd.nist.gov/vuln/detail/CVE-2018-20583
- https://github.com/thephpleague/commonmark/issues/337
- https://commonmark.thephpleague.com/changelog
- https://github.com/FriendsOfPHP/security-advisories/blob/master/league/commonmark/CVE-2018-20583.yaml
- https://github.com/thephpleague/commonmark
- https://github.com/thephpleague/commonmark/releases/tag/0.18.1
- CVSS vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N- Weakness (CWE)
CWE-79- Platform
- Composer
- Package
league/commonmark- Disclosed
- 14.05.2022
- Updated
- 11.10.2026 10:22
Sources and licenses
OSV / GitHub Advisory Database - GHSA-qx76-c53f-5c7q - CC BY 4.0
Vulnerability history: league/commonmark
All published vulnerabilities of this package (Composer package), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 18
- First → latest
- 09.2019 09.2026
- Without a fix
- 0
- Exploited in attacks
- 0
Severity breakdown
- High 10
- Medium 8
Disclosures per year
- 2019: 1
- 2020: 0
- 2021: 0
- 2022: 1
- 2023: 0
- 2024: 1
- 2025: 1
- 2026: 14
-
PHP League CommonMark vulnerable to Cross-Site Scripting (XSS) this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.