Intel

AIKIDO-2026-261475

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

GHSA-97jj-33gv-5xf9Published Sep 23, 2026
September 23, 2026

61

CVE Score

Medium

Cross-Site Scripting (XSS)

Are you affected? Scan for Free

TL;DR

The DisallowedRawHtmlRenderer filter uses a regex that requires a character after a disallowed tag name, so a raw HTML line containing only a bare tag name such as <script passes through unescaped. The GFM block parser opens an HTML block on that bare tag name with no trailing newline for the regex to match, and the next block's raw HTML is then interpreted by the browser as that tag's attributes. Anyone who can submit Markdown rendered with the shipped GFM defaults can use this to achieve stored XSS. The fix widens the regex to also match a disallowed tag name at the end of the string.

How do I fix this?

Upgrade the league/commonmark library to the patch version.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and you use the DisallowedRawHtml extension, enabled by default in GithubFlavoredMarkdownConverter, to render Markdown from untrusted sources.

Versions

1.3.0 - 2.10.1

Fixed in 2.10.2

Background info

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

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea