Loading advisory.
Loading advisory.
league/commonmark contains a XSS vulnerability in Attributes extension
Cross-site scripting (XSS) vulnerability in the Attributes extension of the league/commonmark library (versions 1.5.0 through 2.6.x) allows remote attackers to insert malicious JavaScript calls into HTML.
Published 2025-05-05 19:52 UTC · Modified 2026-03-20 21:31 UTC
Severity and EPSS are shown separately. Helm does not combine them into one score.
| Package | Ecosystem | Affected | Fixed in | Upgrade command |
|---|---|---|---|---|
| league/commonmark | Packagist | >= 1.5.0, < 2.7.0 versions 1.5.0, 1.5.1, 1.5.2, 1.5.3, 1.5.4, 1.5.5, 1.5.6, 1.5.7, 1.5.8, 1.6.0, 1.6.1, 1.6.2, 1.6.3, 1.6.4, 1.6.5, 1.6.6, 1.6.7, 2.0.0, 2.0.0-beta1, 2.0.0-beta2 and 39 more | 2.7.0 | composer require 'league/commonmark:>=2.7.0' |
Cross-site scripting (XSS) vulnerability in the Attributes extension of the league/commonmark library (versions 1.5.0 through 2.6.x) allows remote attackers to insert malicious JavaScript calls into HTML.
The league/commonmark library provides configuration options such as html_input: 'strip' and allow_unsafe_links: false to mitigate cross-site scripting (XSS) attacks by stripping raw HTML and disallowing unsafe links. However, when the Attributes Extension is enabled, it introduces a way for users to inject arbitrary HTML attributes into elements via Markdown syntax using curly braces.
As a result, even with the secure configuration shown above, an attacker can inject dangerous attributes into applications using this extension via a payload such as:
![](){onerror=alert(1)}Which results in the following HTML:
<p><img onerror="alert(1)" src="" alt="" /></p>Which causes the JS to execute immediately on page load.
Version 2.7.0 contains three changes to prevent this XSS attack vector:
All attributes starting with on are considered unsafe and blocked by default
Support for an explicit allowlist of allowed HTML attributes
Manually-added href and src attributes now respect the existing allow_unsafe_links configuration option
If upgrading is not feasible, please consider:
Disabling the AttributesExtension for untrusted users
Filtering the rendered HTML through a library like HTMLPurifier
No public exploit code known to Helm's sources (Nuclei templates, Metasploit, Exploit-DB and PoC-in-GitHub). That does not mean none exists.
EPSS went from 0.004 on 2026-11-24 to 0.005 on 2026-11-30, over 3 recorded scores.
| Date | Score | Previous | Model |
|---|---|---|---|
| 2026-11-24 | 0.004 | first score | v2026.06.15 |
| 2026-11-26 | 0.005 | 0.004 | v2026.06.15 |
| 2026-11-30 | 0.005 | 0.005 | v2026.06.15 |