commonmark before 2.9.1 XSS via AttributesExtension form feed bypass
CVE-2026-86431Published 7 Sep 2026, 12:53 UTC
Real-world risk
2.6/ 10Low
Routine
PreliminaryFrom the CVSS vector only · confidence low
CVSS
6.9
scored by the vendor (CNA), CVSS 4.0
In plain words
No plain-language summary yet. The original description is below.
Original description (from VulnCheck)
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.
Am I affected?
| Product | Affected versions (from the sources) | Fixed in |
|---|---|---|
| commonmarkNiche | >= 2.7.0, < 2.9.1 | 2.9.1 |
What to do
Update to a fixed version: 2.9.1.
Why this score
| Factor | Value | Evidence | × |
|---|---|---|---|
| Impact | MinorReflected XSS, CSRF with low effect, open redirect, minor leak | From the CVSS vector | 0.30 |
| Attacker position | InternetAnyone on the Internet can reach a typical deployment | From the CVSS vector | 1.00 |
| Privileges needed | NoneNo account | From the CVSS vector | 1.00 |
| Victim interaction | NoneNothing | From the CVSS vector | 1.00 |
| Configuration | DefaultOut-of-the-box installs are vulnerable | From the CVSS vector | 1.00 |
| Reliability | ReliableDeterministic: injection, logic bug, path traversal | From the CVSS vector | 1.00 |
Threat level T1: Nothing known (× 0.85)
The default for a new disclosure
EPSS 0.3% chance of exploitation in 30 days (percentile 19), as of 2026-12-03.
The arithmetic
- Prerequisites multiplied together1.000
- Threat T1: Nothing known0.850
- 10 × impact 0.3 × prerequisites 1 × threat 0.852.550
- Rounded to one decimal between 0.1 and 102.6
Exploitation and evidence timeline
- 7 Sep 2026 Published
- 3 Dec 2026 Risk 2.6 (cvss fallback)
Weakness
CWE-79
References
- https://github.com/thephpleague/commonmark/security/advisories/GHSA-f8fg-pg57-v4j8vendor-advisory
- https://github.com/thephpleague/commonmark/commit/43207253ea5f14867c77c697cd3838c446cadceapatch
- https://www.vulncheck.com/advisories/commonmark-before-2.9.1-xss-via-attributesextension-form-feed-bypassthird-party-advisory
- CVE-2026-86431 on CVE.org