# CVE-2026-86431: commonmark before 2.9.1 XSS via AttributesExtension form feed bypass

- Severity: Medium 6.9 (CVSS:4.0, scored by VulnCheck) `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.26%, higher than 19% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-09-01T20:18:29.000Z
- Modified: 2026-10-08T16:17:57.507Z
- Also known as: GHSA-f8fg-pg57-v4j8
- Weaknesses: CWE-79, CWE-86
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial
- Assigned by: VulnCheck

## Description

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.

(As written by CVE List.)

## Affected

- thephpleague commonmark: from 2.7.0 before 2.9.1 (not affected: 2.9.1)
- league/commonmark (Packagist): from 2.7.0 before 2.9.1

## Every score

- VulnCheck: CVSS:4.0 6.9 Medium `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N`
- VulnCheck: CVSS:3.1 7.2 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N`
- GitHub: CVSS:3.1 7.2 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N`

## References

- <https://github.com/thephpleague/commonmark/security/advisories/GHSA-f8fg-pg57-v4j8> (exploit, mitigation, vendor-advisory, web)
- <https://github.com/thephpleague/commonmark/commit/43207253ea5f14867c77c697cd3838c446cadcea> (patch)
- <https://www.vulncheck.com/advisories/commonmark-before-2.9.1-xss-via-attributesextension-form-feed-bypass> (patch, third-party-advisory)
- <https://github.com/thephpleague/commonmark/commit/dfcdf4554c16aa37c15e3a5ee3243ee26147c239> (web)
- <https://github.com/thephpleague/commonmark> (package)
- <https://github.com/thephpleague/commonmark/releases/tag/2.9.1> (web)

## Sources

- CVE List: [CVE-2026-86431](https://www.cve.org/CVERecord?id=CVE-2026-86431), CVE Terms of Use, modified 2026-10-08
- GitHub Advisory Database: [GHSA-f8fg-pg57-v4j8](https://github.com/advisories/GHSA-f8fg-pg57-v4j8), CC-BY-4.0, modified 2026-09-08
- NVD: [CVE-2026-86431](https://nvd.nist.gov/vuln/detail/CVE-2026-86431), Public domain, modified 2026-10-08

---

Page: https://cve.day/CVE-2026-86431 · Whole record: https://cve.day/CVE-2026-86431.json · Rebuilt by cve.day 2026-11-25T22:59:36.529Z
