Description
league/commonmark is a PHP library for parsing and rendering CommonMark Markdown. From 1.5.0 until 2.9.0, the AttributesExtension's href and src unsafe-link filter can be bypassed by embedding control bytes, such as a tab, carriage return, line feed, or leading C0 control character, in a javascript: URL that browsers discard before parsing the scheme, causing the browser to still execute the script even when the unsafe-link filter is enabled. This issue is fixed in 2.9.0.
Published: 2026-08-06
Score: 6.1 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerability lies in the AttributesExtension of the PHP library, where control bytes such as tabs, carriage returns, line feeds, or leading C0 control characters can be embedded in a javascript: URL. Browsers discard these bytes before parsing the scheme, so the unsafe-link filter is bypassed and the script still executes. The result is a cross‑site scripting (XSS) attack that can compromise confidentiality, integrity, and availability of client‑side data. The weakness corresponds to CWE‑692, CWE‑79, and CWE‑86 – improper handling of escape characters, input validation failures, and unsafe script execution.

Affected Systems

Thephpleague’s commonmark library versions from 1.5.0 through and including 2.9.0 are affected. The rendering of markdown that passes through the AttributesExtension without updating to 2.9.0 or later allows the bypass. Vendors and developers using these library versions in web applications should verify the installed version and consider upgrading.

Risk and Exploitability

With a CVSS score of 6.1 the vulnerability is of moderate severity. The EPSS score is unavailable, and the vulnerability is not listed in CISA KEV catalogs at this time. The most likely attack vector involves an attacker supplying malicious markdown content to an application that renders it with the AttributesExtension enabled. The control‑byte trick means the browser will execute the embedded javascript, allowing the attacker to hijack the user session, steal credentials, or perform other client‑side malicious actions. No additional exploitation conditions are disclosed; the vulnerability can be triggered by any user who can submit content that the application renders.

Generated by OpenCVE AI on August 7, 2026 at 00:49 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade league/commonmark to version 2.9.0 or newer, where the unsafe‑link filter correctly handles control bytes.
  • Replace or sanitize any deprecated markdown parsing calls to ensure that javascript: URLs are filtered before rendering.
  • Configure the application to reject or escape javascript: URLs entirely in user‑supplied markdown to mitigate any future parsing changes.

Generated by OpenCVE AI on August 7, 2026 at 00:49 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-29pj-957v-52mc league/commonmark: AttributesExtension href/src unsafe-link filter bypass via embedded control bytes
History

Fri, 07 Aug 2026 17:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Fri, 07 Aug 2026 01:30:00 +0000

Type Values Removed Values Added
First Time appeared Thephpleague
Thephpleague commonmark
Vendors & Products Thephpleague
Thephpleague commonmark

Thu, 06 Aug 2026 22:15:00 +0000

Type Values Removed Values Added
Description league/commonmark is a PHP library for parsing and rendering CommonMark Markdown. From 1.5.0 until 2.9.0, the AttributesExtension's href and src unsafe-link filter can be bypassed by embedding control bytes, such as a tab, carriage return, line feed, or leading C0 control character, in a javascript: URL that browsers discard before parsing the scheme, causing the browser to still execute the script even when the unsafe-link filter is enabled. This issue is fixed in 2.9.0.
Title league/commonmark: AttributesExtension href/src unsafe-link filter bypass via embedded control bytes
Weaknesses CWE-692
CWE-79
CWE-86
References
Metrics cvssV3_1

{'score': 6.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N'}


Subscriptions

Thephpleague Commonmark
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-08-07T17:05:57.244Z

Reserved: 2026-08-06T19:56:23.724Z

Link: CVE-2026-71478

cve-icon Vulnrichment

Updated: 2026-08-07T17:05:41.139Z

cve-icon NVD

Status : Received

Published: 2026-08-06T22:18:31.750

Modified: 2026-08-07T18:17:23.770

Link: CVE-2026-71478

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-07T01:15:04Z

Weaknesses
  • CWE-692

    Incomplete Denylist to Cross-Site Scripting

  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

  • CWE-86

    Improper Neutralization of Invalid Characters in Identifiers in Web Pages