league/commonmark Cross-site Scripting vulnerability in Attributes extension
Key facts
- Attack vector
- Network
- Privileges required
- Low
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Cross-site scripting
- Confidentiality · integrity · availability
- Low · Low · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-79.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| thephpleague | commonmark | before 2.7.0 | 2.7.0 | Patch available | CNA |
| — | league/commonmark (Packagist) | 1.5.0 to before 2.7.0 | 2.7.0 | Patch available | GHSA-3527-qv2q-pfvx |
- commonmark Vendorthephpleague Affected before 2.7.0 Fixed in 2.7.0 Patch available CNA
- league/commonmark (Packagist) Vendor— Affected 1.5.0 to before 2.7.0 Fixed in 2.7.0 Patch available GHSA-3527-qv2q-pfvx
CPE names Threatist (inferred) · 1
Inferred from how NVD named this product before; not given by a source.
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:thephpleague:commonmark:*:*:*:*:*:*:*:* | — | — | thephpleague |
- cpe:2.3:a:thephpleague:commonmark:*:*:*:*:*:*:*:* Versions — — ·thephpleague
Remediation
- Fix · CNA commonmark (thephpleague) Fixed in 2.7.0
- Fix · GHSA-3527-qv2q-pfvx league/commonmark (Packagist) Fixed in 2.7.0 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2025-46734
- 2026-10-03 Alias added: GHSA-3527-qv2q-pfvx
References
More thephpleague vulnerabilities
- TI-2026-69535 league/commonmark Quadratic DoS via TableStartParser CVSS 4.0HIGH 8.7
- TI-2026-50093 league/commonmark: AttributesExtension href/src unsafe-link filter bypass via embedded control bytes CVSS 3.1MEDIUM 6.1
- TI-2026-69534 Cross-site scripting in League CommonMark bypasses DisallowedRawHtml CVSS 4.0MEDIUM 5.3
- TI-2026-65445 Flysystem: WhitespacePathNormalizer's control-character (CorruptedPathDetected) check is… CVSS 3.1LOW 3.5
- TI-2021-12376 Time-of-check Time-of-use (TOCTOU) Race Condition in league/flysystem CVSS 3.1CRITICAL 9.8
- TI-2026-59143 commonmark 1.5.0 before 2.8.4 Denial of Service via Footnote CVSS 4.0HIGH 8.7
Sources
- CVE-2025-46734 · CVE Program
- CVE-2025-46734 · NVD
- FIRST EPSS
- GHSA-3527-qv2q-pfvx · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences