Intel

AIKIDO-2026-941388

league/commonmark is vulnerable to Cross-Site Scripting (XSS)

Cross-Site Scripting (XSS)GHSA-29pj-957v-52mc Published Aug 5, 2026

61

Medium Risk

This Affects:

PHPleague/commonmark
1.5.0 - 2.8.3
Fixed in 2.9.0
Are you affected? Scan for Free

TL;DR

The Attributes extension's href and src unsafe-link filter checks each URL against an anchored denylist regex without first normalizing embedded control bytes. Markdown that hides a javascript: scheme with an embedded tab, newline, or leading control character passes the filter unchanged, even when allow_unsafe_links is disabled. Browsers strip those bytes before parsing the scheme, so the crafted link still executes script in a viewer's session. The fix normalizes control characters in the unsafe-link check so obfuscated dangerous schemes are detected and filtered.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and you use the Attributes extension to render untrusted Markdown input.

Background info

league/commonmark is vulnerable to Cross-Site Scripting (XSS) in versions 1.5.0 - 2.8.3.

How to fix this

Upgrade the league/commonmark library to the patch version.

Are You Affected?

Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.

Free. No credit card required.

Aikido Platform