Skip to main content
EPSS 0.4%top 68%

CVE-2026-86431: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in thephpleague commonmark

0
Medium
VulnerabilityCVE-2026-86431cvecve-2026-86431
Published: 09/07/2026 (09/07/2026, 12:53:51 UTC)
Source: CVE Database V5
Vendor/Project: thephpleague
Product: commonmark

Description

A cross-site scripting (XSS) vulnerability exists in thephpleague/commonmark versions 2.7.0 up to but not including 2.9.1. The flaw occurs in the AttributesExtension where a form feed character prefix in attribute names bypasses filtering, allowing malicious event handlers and javascript: URIs to be injected. This can lead to script execution when untrusted Markdown is rendered with the AttributesExtension enabled. The issue is fixed in version 2.9.1.

CVSS v4.0

Score 6.9medium

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vuln. Confidentiality
Low
Vuln. Integrity
Low
Vuln. Availability
None
Subsq. Confidentiality
Low
Subsq. Integrity
Low
Subsq. Availability
None
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

Affected software

thephpleague

commonmark

Affected versions
>=2.7.0 <2.9.1
Packagistmore threats →ai
thephpleague/commonmark
pkg:composer/thephpleague/commonmark
Affected versions
=2.7.0<2.9.1

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 10/09/2026, 21:25:24 UTC

Technical Analysis

Thephpleague/commonmark versions >=2.7.0 and <2.9.1 contain a cross-site scripting vulnerability in the AttributesExtension. Specifically, prefixing an attribute name with a U+000C form feed character bypasses the AttributesHelper::filterAttributes() 'on*' event-handler filter because PHP's trim() function does not remove this character. This allows an attacker to inject event handlers (e.g., onclick) that execute arbitrary scripts. Additionally, the same prefix bypasses the allow_unsafe_links check, permitting javascript: URIs in href/src attributes even when unsafe links are disallowed. Exploitation requires processing untrusted Markdown with the AttributesExtension enabled, and the injected script executes upon rendering the HTML. The vulnerability is fixed in version 2.9.1.

Potential Impact

Successful exploitation allows an attacker to inject and execute arbitrary JavaScript in the context of the victim's browser when viewing rendered Markdown content. This can lead to typical XSS impacts such as session hijacking, defacement, or redirection. The vulnerability affects applications that process untrusted Markdown with the AttributesExtension enabled and do not sanitize input beyond the flawed filtering.

Mitigation Recommendations

Upgrade thephpleague/commonmark to version 2.9.1 or later, where this vulnerability is fixed. Until upgrading, avoid processing untrusted Markdown with the AttributesExtension enabled or implement additional input sanitization to block form feed characters in attribute names. No other official fixes or temporary mitigations are documented.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
VulnCheck
Date Reserved
2026-09-07T12:34:31.457Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 6a9eb72cacd9273b49a9cf78

Added to database: 09/07/2026, 13:07:56 UTC

Last enriched: 10/09/2026, 21:25:24 UTC

Last updated: 10/22/2026, 13:15:24 UTC

Views: 87

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses