commonmark before 2.9.1 XSS via AttributesExtension form feed bypass
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Attack requirements
- None
- Impact type
- Cross-site scripting
- Confidentiality · integrity · availability
- Low · Low · None
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA. Impact type from CWE-79.
Summary
league/commonmark (thephpleague/commonmark) versions >= 2.7.0 and < 2.9.1 contain a cross-site scripting vulnerability in the AttributesExtension. Prefixing an attribute name with a single U+000C form feed byte (e.g. {\x0Conclick="alert(1)"}) bypasses the AttributesHelper::filterAttributes() 'on*' event-handler filter because PHP's trim() does not strip U+000C, causing the attribute to be written verbatim into the output where browsers parse it as a genuine event handler. The same prefix also defeats the allow_unsafe_links check, allowing javascript: URIs through href/src attributes even when allow_unsafe_links is false. Exploitation requires processing untrusted Markdown with the AttributesExtension enabled; the injected script executes when the rendered HTML is viewed. Fixed in 2.9.1.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- Yes
- 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 | 2.7.0 to before 2.9.1 | 2.9.1 | Patch available | CNA |
- commonmark Vendorthephpleague Affected 2.7.0 to before 2.9.1 Fixed in 2.9.1 Patch available CNA
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:thephpleague:commonmark:*:*:*:*:*:*:*:* | 2.7.0 to before 2.9.1 | Vulnerable | thephpleague |
- cpe:2.3:a:thephpleague:commonmark:*:*:*:*:*:*:*:* Versions 2.7.0 to before 2.9.1 Vulnerable ·thephpleague
Remediation
- Fix · CNA commonmark (thephpleague) Fixed in 2.9.1
Fixed in the same release
Records fixed by the same vendor advisory or release, as the CNA lists them.
- Release ·
thephpleague commonmark 2.9.1
3 records Highest priority Priority MEDIUM 2 MEDIUM, 1 LOW
Other records, highest priority first
- TI-2026-59138 league/commonmark before 2.9.1 Denial of Service via parsingPriority MEDIUM 44
- TI-2026-59137 commonmark before 2.9.1 Denial of Service via SmartPunct and AttributesPriority MEDIUM 44
Timeline
- 2026-10-02 Threatist record created from CVE-2026-86431
- 2026-10-03 Alias added: GHSA-m24x-mf52-x8gc
References
Patch 1
More thephpleague Commonmark vulnerabilities
- TI-2026-59138 league/commonmark before 2.9.1 Denial of Service via parsing CVSS 4.0HIGH 8.7
- TI-2026-59137 commonmark before 2.9.1 Denial of Service via SmartPunct and Attributes CVSS 4.0HIGH 8.7
- TI-2026-59136 commonmark 1.5.0 before 2.10.0 Denial of Service via Attributes CVSS 4.0HIGH 8.7
- TI-2026-25753 league/commonmark has an embed extension allowed_domains bypass CVSS 4.0MEDIUM 6.3
- TI-2018-14605 Cross-site scripting (XSS) vulnerability in the PHP League CommonMark library versions… CVSS 3.0MEDIUM 6.1
- TI-2019-07346 Cross-site scripting (XSS) vulnerability in the PHP League CommonMark library before… CVSS 3.0MEDIUM 6.1
Sources
- CVE-2026-86431 · CVE Program
- CVE-2026-86431 · NVD
- FIRST EPSS
- GHSA-m24x-mf52-x8gc · 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