CVE-2025-46734 league/commonmark Cross-site Scripting vulnerability in Attributes extension
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- No known exploitation · automatable: no · technical impact: partial
- Technology
- PHPUbuntuDebian
Description
league/commonmark is a PHP Markdown parser. A cross-site scripting (XSS) vulnerability in the Attributes extension of the league/commonmark library (versions 1.5.0 through 2.6.x) allows remote attackers to insert malicious JavaScript calls into HTML. The league/commonmark library provides configuration options such as html_input: 'strip' and allow_unsafe_links: false to mitigate cross-site scripting (XSS) attacks by stripping raw HTML and disallowing unsafe links. However, when the Attributes Extension is enabled, it introduces a way for users to inject arbitrary HTML attributes into elements via Markdown syntax using curly braces. Version 2.7.0 contains three changes to prevent this XSS attack vector: All attributes starting with on are considered unsafe and blocked by default; support for an explicit allowlist of allowed HTML attributes; and manually-added href and src attributes now respect the existing allow_unsafe_links configuration option. If upgrading is not feasible, please consider disabling the AttributesExtension for untrusted users and/or filtering the rendered HTML through a library like HTMLPurifier.
Upgrade path
7 packages: 6 fixed.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| debian/php-league-commonmark(Debian 12) | < 2.3.9-1+deb12u1; = 2.3.9-1 | 2.3.9-1+deb12u1 | Fixed |
| debian/php-league-commonmark(Debian 13) | < 2.7.0-1 | 2.7.0-1 | Fixed |
| debian/php-league-commonmark(Debian 14) | < 2.7.0-1 | 2.7.0-1 | Fixed |
| league/commonmark(Packagist) | = 1.5.0; = 1.5.1; = 1.5.2; = 1.5.3 +56 more | 2.7.0 | Fixed |
| ubuntu/php-league-commonmark(Ubuntu 22.04) | < 1.6.7-1ubuntu0.1~esm1 | 1.6.7-1ubuntu0.1~esm1 | Fixed |
| ubuntu/php-league-commonmark(Ubuntu 24.04) | < 2.4.2-2ubuntu0.1~esm1 | 2.4.2-2ubuntu0.1~esm1 | Fixed |
| thephpleague commonmark | = < 2.7.0 | No fix listed | Versions listed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| league/commonmark(Packagist) | >= 1.5.0, < 2.7.0 | 2.7.0 |
| league/commonmark(Packagist) | = 1.5.0 | No fix listed |
| league/commonmark(Packagist) | = 1.5.1 | No fix listed |
| league/commonmark(Packagist) | = 1.5.2 | No fix listed |
| league/commonmark(Packagist) | = 1.5.3 | No fix listed |
| league/commonmark(Packagist) | = 1.5.4 | No fix listed |
| league/commonmark(Packagist) | = 1.5.5 | No fix listed |
| league/commonmark(Packagist) | = 1.5.6 | No fix listed |
| league/commonmark(Packagist) | = 1.5.7 | No fix listed |
| league/commonmark(Packagist) | = 1.5.8 | No fix listed |
| league/commonmark(Packagist) | = 1.6.0 | No fix listed |
| league/commonmark(Packagist) | = 1.6.1 | No fix listed |
| league/commonmark(Packagist) | = 1.6.2 | No fix listed |
| league/commonmark(Packagist) | = 1.6.3 | No fix listed |
| league/commonmark(Packagist) | = 1.6.4 | No fix listed |
| league/commonmark(Packagist) | = 1.6.5 | No fix listed |
| league/commonmark(Packagist) | = 1.6.6 | No fix listed |
| league/commonmark(Packagist) | = 1.6.7 | No fix listed |
| league/commonmark(Packagist) | = 2.0.0 | No fix listed |
| league/commonmark(Packagist) | = 2.0.0-beta1 | No fix listed |
| league/commonmark(Packagist) | = 2.0.0-beta2 | No fix listed |
| league/commonmark(Packagist) | = 2.0.0-beta3 | No fix listed |
| league/commonmark(Packagist) | = 2.0.0-rc1 | No fix listed |
| league/commonmark(Packagist) | = 2.0.0-rc2 | No fix listed |
| league/commonmark(Packagist) | = 2.0.1 | No fix listed |
Show 42 more
| Product | Affected versions | Fixed in |
|---|---|---|
| league/commonmark(Packagist) | = 2.0.2 | No fix listed |
| league/commonmark(Packagist) | = 2.0.3 | No fix listed |
| league/commonmark(Packagist) | = 2.0.4 | No fix listed |
| league/commonmark(Packagist) | = 2.1.0 | No fix listed |
| league/commonmark(Packagist) | = 2.1.1 | No fix listed |
| league/commonmark(Packagist) | = 2.1.2 | No fix listed |
| league/commonmark(Packagist) | = 2.1.3 | No fix listed |
| league/commonmark(Packagist) | = 2.2.0 | No fix listed |
| league/commonmark(Packagist) | = 2.2.1 | No fix listed |
| league/commonmark(Packagist) | = 2.2.2 | No fix listed |
| league/commonmark(Packagist) | = 2.2.3 | No fix listed |
| league/commonmark(Packagist) | = 2.2.4 | No fix listed |
| league/commonmark(Packagist) | = 2.2.5 | No fix listed |
| league/commonmark(Packagist) | = 2.3.0 | No fix listed |
| league/commonmark(Packagist) | = 2.3.1 | No fix listed |
| league/commonmark(Packagist) | = 2.3.2 | No fix listed |
| league/commonmark(Packagist) | = 2.3.3 | No fix listed |
| league/commonmark(Packagist) | = 2.3.4 | No fix listed |
| league/commonmark(Packagist) | = 2.3.5 | No fix listed |
| league/commonmark(Packagist) | = 2.3.6 | No fix listed |
| league/commonmark(Packagist) | = 2.3.7 | No fix listed |
| league/commonmark(Packagist) | = 2.3.8 | No fix listed |
| league/commonmark(Packagist) | = 2.3.9 | No fix listed |
| league/commonmark(Packagist) | = 2.4.0 | No fix listed |
| league/commonmark(Packagist) | = 2.4.1 | No fix listed |
| league/commonmark(Packagist) | = 2.4.2 | No fix listed |
| league/commonmark(Packagist) | = 2.4.3 | No fix listed |
| league/commonmark(Packagist) | = 2.4.4 | No fix listed |
| league/commonmark(Packagist) | = 2.5.0 | No fix listed |
| league/commonmark(Packagist) | = 2.5.1 | No fix listed |
| league/commonmark(Packagist) | = 2.5.2 | No fix listed |
| league/commonmark(Packagist) | = 2.5.3 | No fix listed |
| league/commonmark(Packagist) | = 2.6.0 | No fix listed |
| league/commonmark(Packagist) | = 2.6.1 | No fix listed |
| league/commonmark(Packagist) | = 2.6.2 | No fix listed |
| debian/php-league-commonmark(Debian:12) | < 2.3.9-1+deb12u1 | 2.3.9-1+deb12u1 |
| debian/php-league-commonmark(Debian:14) | < 2.7.0-1 | 2.7.0-1 |
| debian/php-league-commonmark(Debian:13) | < 2.7.0-1 | 2.7.0-1 |
| debian/php-league-commonmark(Debian:12) | = 2.3.9-1 | No fix listed |
| thephpleague commonmark | = < 2.7.0 | No fix listed |
| ubuntu/php-league-commonmark(Ubuntu:22.04) | < 1.6.7-1ubuntu0.1~esm1 | 1.6.7-1ubuntu0.1~esm1 |
| ubuntu/php-league-commonmark(Ubuntu:24.04) | < 2.4.2-2ubuntu0.1~esm1 | 2.4.2-2ubuntu0.1~esm1 |
References
- https://github.com/thephpleague/commonmark/security/advisories/GHSA-3527-qv2q-pfvx vendor-advisory
- nvd.nist.gov third-party-advisory vendor-advisory
- https://github.com/thephpleague/commonmark/commit/f0d626cf05ad3e99e6db26ebcb9091b6cd1cd89b patch
- github.com product
- Debian Security Tracker CVE-2025-46734 vendor-advisory
- github.com
- Ubuntu CVE tracker vendor-advisory
- USN-8194-1 vendor-advisory
- www.cve.org