CVE catalog

CVE-2025-46734

league/commonmark vulnerabilities

[CVE catalog]

Severity
Medium
Published
Source
[NVD] · [CVE record]
EPSS
0.38% · Oct 25, 2026

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.

Vulnerable and fixed packages

Distribution-reported package versions and fixes. These do not depend on matching against the OpenFactory package catalog.

DistributionPackageReleaseVersionStatus
Debianphp-league-commonmarksid2.10.4-1fixed
Debianphp-league-commonmarkforky2.10.4-1fixed
Debianphp-league-commonmarktrixie2.7.0-1+deb13u1fixed
Debianphp-league-commonmarkbookworm2.3.9-1+deb12u1fixed
Ubuntuphp-league-commonmarknobleNot reportedvulnerable
Ubuntuphp-league-commonmarknoble2.4.2-2ubuntu0.1~esm1fixed
Ubuntuphp-league-commonmarkpro2.3.9-1vulnerable
Ubuntuphp-league-commonmarkpro2.4.1-1vulnerable
Ubuntuphp-league-commonmarkpro2.4.2-1vulnerable
Ubuntuphp-league-commonmarkpro2.4.2-2vulnerable
Ubuntuphp-league-commonmarkpro2.4.2-2ubuntu0.1~esm1fixed
Ubuntuphp-league-commonmarkpro2.3.9-1vulnerable
Ubuntuphp-league-commonmarkpro2.4.1-1vulnerable
Ubuntuphp-league-commonmarkpro2.4.2-1vulnerable
Ubuntuphp-league-commonmarkpro2.4.2-2vulnerable
Ubuntuphp-league-commonmarkpro2.4.2-2ubuntu0.1~esm1fixed

Fixed-version evidence

DistributionPackageTypeReleaseFixed versionUrgencyOriginBugs
Debianphp-league-commonmarksourcesid2.7.0-1not yet assignedNot reportedNot reported
Debianphp-league-commonmarksourceforky2.7.0-1not yet assignedNot reportedNot reported
Debianphp-league-commonmarksourcetrixie2.7.0-1not yet assignedNot reportedNot reported
Debianphp-league-commonmarksourcebookworm2.3.9-1+deb12u1not yet assignedNot reportedNot reported
Ubuntuphp-league-commonmarkdebnoble2.4.2-2ubuntu0.1~esm1Not reportedNot reportedNot reported
Ubuntuphp-league-commonmarkdebpro2.4.2-2ubuntu0.1~esm1Not reportedUSN-8194-1Not reported
Ubuntuphp-league-commonmarkdebpro2.4.2-2ubuntu0.1~esm1Not reportedUBUNTU-CVE-2025-46734Not reported

OpenFactory catalog packages

[Debian 12 (Bookworm)]

  • Details (2)
    • 2.3.9-1+deb12u1 · all · bookworm

      Fixed · Fixed: 2.3.9-1+deb12u1

      usn · php-league-commonmark · debian · bookworm; usn · php-league-commonmark · debian · 12

    • 2.3.9-1+deb12u1 · all · bookworm

      Fixed · Fixed: 2.3.9-1+deb12u1

      usn · php-league-commonmark · debian · bookworm; usn · php-league-commonmark · debian · 12

[Debian 13 (Trixie)]

  • Details (2)
    • 2.7.0-1+deb13u1 · all · trixie

      Fixed · Fixed: 2.7.0-1

      usn · php-league-commonmark · debian · 13

    • 2.7.0-1+deb13u1 · all · trixie

      Fixed · Fixed: 2.7.0-1

      usn · php-league-commonmark · debian · 13

Observed:

References