CVE-2026-86431
Received Received - Intake

XSS in league/commonmark via Form Feed Bypass

Vulnerability report for CVE-2026-86431, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-09-07

Last updated on: 2026-09-07

Assigner: 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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-09-07
Last Modified
2026-09-07
Generated
2026-09-07
AI Q&A
2026-09-07
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
thephpleague commonmark From 2.7.0 (inc) to 2.9.1 (exc)

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-79 The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This is a cross-site scripting (XSS) vulnerability in the league/commonmark library affecting versions 2.7.0 to 2.9.0. It involves the AttributesExtension where a form feed character (U+000C) can bypass security filters. By prefixing an attribute name with this character, malicious event handlers like onclick are not blocked and are rendered in HTML output, executing JavaScript when viewed in a browser.

Detection Guidance

To detect this vulnerability, check if your system uses league/commonmark versions between 2.7.0 and 2.9.0. Run: composer show thephpleague/commonmark to verify the installed version. If vulnerable, inspect Markdown processing for AttributesExtension usage with untrusted input.

Impact Analysis

If you process untrusted Markdown with the AttributesExtension enabled, attackers could inject malicious JavaScript. This could lead to unauthorized actions, data theft, or session hijacking when users view the rendered HTML. The vulnerability bypasses security settings like allow_unsafe_links, enabling further attacks.

Compliance Impact

This XSS vulnerability could lead to unauthorized data access or modification, violating GDPR's integrity and confidentiality principles. For HIPAA, it may compromise protected health information integrity. Organizations using affected versions risk non-compliance due to insufficient input sanitization and security controls.

Mitigation Strategies

Upgrade to league/commonmark version 2.9.1 or later immediately. If upgrading is not possible, disable the AttributesExtension or restrict attribute processing to trusted sources. Add form feed character U+000C to trim charlist in AttributesHelper.php as a temporary fix.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-86431. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart