CVE-2026-86431 is an XSS bypass in league/commonmark's AttributesExtension. The library's security logic checks attribute names for the 'on' prefix to block event handlers and enforces allow_unsafe_links to block javascript: URIs. This protection fails because the code uses PHP's trim() to sanitize input, implicitly trusting that trim() strips all whitespace-like characters. It doesn't. PHP's trim() explicitly preserves U+000C (form feed) — a behavior inherited from C's isspace() contract, designed for printer control, not browser security. When the browser renders the resulting HTML, it normalizes U+000C to nothing. An attacker can therefore inject an event handler by prefixing it with a single form feed character: 'onu000Cclick' passes the security check, and the browser renders it as 'onclick'. The vulnerability is triggerable whenever AttributesExtension is enabled, which is a documented feature of the library.

This is not a coding error. The developer wrote reasonable security logic — they checked for dangerous prefixes and enforced link safety settings. The failure is that the boundary between 'security logic' and 'string hygiene' is undefended. trim() was never designed to be a security primitive; it's a utility for cleaning strings for display, and its whitespace definition reflects C's historical needs, not any threat model. The fix in version 2.9.1 blocks U+000C specifically, but this is symptom-targeting: the next Unicode character that trim() passes but browsers collapse is already waiting.

For defenders: upgrade to 2.9.1 immediately if you use AttributesExtension. Beyond that, audit any sanitization layer that relies on general-purpose string functions — trim(), htmlspecialchars(), or equivalent — without explicit validation against the target consumer's normalization behavior. This vulnerability is a proof-of-concept for a class of bypasses that almost certainly exists in other Markdown processors and HTML generation libraries. The pattern of security checks subverted by invisible characters that string hygiene functions let through but browsers collapse is systemic, not isolated.