Skip to content
Fencer Vulns
medium 6.4

CVE-2025-46734 json

league/commonmark Cross-site Scripting vulnerability in Attributes extension

published 2025-05-05 18 mo ago modified 2026-06-17 4 mo ago also EUVD-2025-13411 , GHSA-3527-qv2q-pfvx

cvss
6.4
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
0.4%
EPSS 0.4% chance of exploitation in 30 days, percentile 32%
public exploits
0
none known

Summary

league/commonmark is a PHP Markdown parser. A 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. 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; and 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 and/or filtering the rendered HTML through a library like HTMLPurifier.

Patch / fix

  • packagist league/commonmark 2.7.0
  • thephpleague commonmark 2.7.0
  • php-league-commonmark Debian 12 2.3.9-1+deb12u1
  • php-league-commonmark Debian 14, Debian 13 2.7.0-1

debian advisories DEBIAN-CVE-2025-46734

  • php-league-commonmark Ubuntu Pro 20.04 LTS 1.3.1-1ubuntu2+esm1
  • php-league-commonmark Ubuntu Pro 22.04 LTS 1.6.7-1ubuntu0.1~esm1
  • php-league-commonmark Ubuntu Pro 24.04 LTS 2.4.2-2ubuntu0.1~esm1

ubuntu advisories UBUNTU-CVE-2025-46734

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

CISA SSVC

Exploitation
none
Automatable
no
Technical impact
partial
Assessed
18 mo ago

Exploit prediction

0.38% chance of exploitation in the next 30 days, higher than 32% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
CNA 3.1 6.4 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N
GitHub 3.1 6.4 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N

Affected packages

ecosystem package affected fixed in
packagist league/commonmark
>=1.5.0, <2.7.0
2.7.0

Affected products

  • thephpleague commonmark

Classification

Weakness
  • CWE-79 Improper Neutralization of Input During Web Page Generation

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.

CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.