p PatchFirst

CVE-2026-86431

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

This page contains facts from public vulnerability sources. Check the original advisory before updating.

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 6.9 · Medium · EPSS 0.4% · Fix available

Published
Updated

Stack: system · php

Affected products and versions

  • commonmark

    Versions
    • ≥ 2.7.0, < 2.9.1: Affected (semver)
    • 2.9.1: Not affected (semver)

    Update to 2.9.1

  • php-league-commonmark Debian:12

    Versions
    • 2.10.0-1
    • 2.10.1-1
    • 2.10.3-1
    • 2.3.9-1
    • 2.3.9-1+deb12u1
    • 2.4.0-1
    • 2.4.1-1
    • 2.4.2-1
    • 2.4.2-2
    • 2.5.0-1
    • 2.5.1-1
    • 2.5.3-1
    • 2.6.0-1
    • 2.6.1-1
    • 2.6.1-2
    • 2.6.2-1
    • 2.7.0-1
    • 2.7.1-1
    • 2.7.1-2
    • 2.8.0-1
    • 2.8.1-1
    • 2.8.2-1
    • 2.8.2-2
    • 2.8.3-1
    • 2.9.0-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • php-league-commonmark Debian:13

    Versions
    • 2.10.0-1
    • 2.10.1-1
    • 2.10.3-1
    • 2.7.0-1
    • 2.7.0-1+deb13u1
    • 2.7.1-1
    • 2.7.1-2
    • 2.8.0-1
    • 2.8.1-1
    • 2.8.2-1
    • 2.8.2-2
    • 2.8.3-1
    • 2.9.0-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • php-league-commonmark Debian:14

    Versions
    • 2.7.0-1
    • 2.7.1-1
    • 2.7.1-2
    • 2.8.0-1
    • 2.8.1-1
    • 2.8.2-1
    • 2.8.2-2
    • 2.8.3-1
    • 2.9.0-1
    Affected ranges
    • ECOSYSTEM: < 2.10.0-1

    Update to 2.10.0-1

  • league/commonmark Packagist

    Versions
    • 2.7.0
    • 2.7.1
    • 2.8.0
    • 2.8.1
    • 2.8.2
    • 2.8.3
    • 2.9.0
    Affected ranges
    • ECOSYSTEM: ≥ 2.7.0, < 2.9.1

    Update to 2.9.1

  • php-league-commonmark Ubuntu:Pro:20.04:LTS

    Versions
    • 1.1.2-1
    • 1.2.0-1
    • 1.3.0-1
    • 1.3.1-1
    • 1.3.1-1ubuntu2
    • 1.3.1-1ubuntu2+esm1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • php-league-commonmark Ubuntu:Pro:22.04:LTS

    Versions
    • 1.5.7-2build1
    • 1.6.6-1build1
    • 1.6.7-1
    • 1.6.7-1ubuntu0.1~esm1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • php-league-commonmark Ubuntu:Pro:24.04:LTS

    Versions
    • 2.3.9-1
    • 2.4.1-1
    • 2.4.2-1
    • 2.4.2-2
    • 2.4.2-2ubuntu0.1~esm1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • php-league-commonmark Ubuntu:26.04:LTS

    Versions
    • 2.7.0-1
    • 2.7.1-2
    • 2.8.0-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

Original sources

Check your server →