Skip to content

Update dependency league/commonmark to ^2.8.2 [SECURITY]#354

Open
renovate[bot] wants to merge 1 commit intostagingfrom
renovate/packagist-league-commonmark-vulnerability
Open

Update dependency league/commonmark to ^2.8.2 [SECURITY]#354
renovate[bot] wants to merge 1 commit intostagingfrom
renovate/packagist-league-commonmark-vulnerability

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Mar 7, 2026

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
league/commonmark (source) ^2.7.1^2.8.2 age adoption passing confidence

GitHub Vulnerability Alerts

CVE-2026-33347

Impact

The DomainFilteringAdapter in the Embed extension is vulnerable to an allowlist bypass due to a missing hostname boundary assertion in the domain-matching regex. An attacker-controlled domain like youtube.com.evil passes the allowlist check when youtube.com is an allowed domain.

This enables two attack vectors:

  • SSRF: The OscaroteroEmbedAdapter makes server-side HTTP requests to the embed URL via the embed/embed library. A bypassed domain filter causes the server to make outbound requests to an attacker-controlled host, potentially probing internal services or exfiltrating request metadata.
  • XSS: EmbedRenderer outputs the oEmbed response HTML directly into the page with no sanitization. An attacker controlling the bypassed domain can return arbitrary HTML/JavaScript in their oEmbed response, which is rendered verbatim.

Any application using the Embed extension and relying on allowed_domains to restrict domains when processing untrusted Markdown input is affected.

Patches

This has been patched in version 2.8.2. The fix replaces the regex-based domain check with explicit hostname parsing using parse_url(), ensuring exact domain and subdomain matching only.

Workarounds

  • Disable the Embed extension, or restrict its use to trusted users
  • Provide your own domain-filtering implementation of EmbedAdapterInterface
  • Enable a Content Security Policy (CSP) and outbound firewall restrictions

CVE-2026-30838

Impact

The DisallowedRawHtml extension can be bypassed by inserting a newline, tab, or other ASCII whitespace character between a disallowed HTML tag name and the closing >. For example, <script\n> would pass through unfiltered and be rendered as a valid HTML tag by browsers. This is a cross-site scripting (XSS) vector for any application that relies on this extension to sanitize untrusted user input.

All applications using the DisallowedRawHtml extension to process untrusted markdown are affected. Applications that use a dedicated HTML sanitizer (such as HTML Purifier) on the rendered output are not affected.

Patches

Fixed in 2.8.1. The regex character class [ \/>] was changed to [\s\/>] to match all whitespace characters that browsers accept as valid tag name terminators.

Workarounds

  • Set the html_input configuration option to 'escape' or 'strip' to disable all raw HTML, though this is a broader restriction than the DisallowedRawHtml extension provides.
  • Pass the rendered HTML through a dedicated HTML sanitizer before serving it to users (always recommended)

Release Notes

thephpleague/commonmark (league/commonmark)

v2.8.2

Compare Source

This is a security release to address an issue where the allowed_domains setting for the Embed extension can be bypassed, resulting in a possible SSRF and XSS vulnerabilities.

Fixed
  • Fixed DomainFilteringAdapter hostname boundary bypass where domains like youtube.com.evil could match an allowlist entry for youtube.com (GHSA-hh8v-hgvp-g3f5)

v2.8.1

Compare Source

This is a security release to address an issue where DisallowedRawHtml can be bypassed, resulting in a possible cross-site scripting (XSS) vulnerability.

Fixed
  • Fixed DisallowedRawHtmlRenderer not blocking raw HTML tags with trailing ASCII whitespace (GHSA-4v6x-c7xx-hw9f)
  • Fixed PHP 8.5 deprecation (#​1107)

v2.8.0

Compare Source

Added
  • Added a new HighlightExtension for marking important text using == syntax (#​1100)
Fixed
  • Fixed AutolinkExtension incorrectly matching URLs after invalid www. prefix (#​1095, #​1103)

Configuration

📅 Schedule: Branch creation - "" in timezone UTC, Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

Read more information about the use of Renovate Bot within Laminas.

@renovate renovate bot force-pushed the renovate/packagist-league-commonmark-vulnerability branch from fbb7b86 to a498aa6 Compare March 13, 2026 11:35
@renovate renovate bot changed the title Update dependency league/commonmark to ^2.8.1 [SECURITY] Update dependency league/commonmark to ^2.8.2 [SECURITY] Mar 20, 2026
@renovate renovate bot force-pushed the renovate/packagist-league-commonmark-vulnerability branch from a498aa6 to a8d9f71 Compare March 20, 2026 00:51
@renovate renovate bot changed the title Update dependency league/commonmark to ^2.8.2 [SECURITY] Update dependency league/commonmark to ^2.8.2 [SECURITY] - autoclosed Mar 20, 2026
@renovate renovate bot closed this Mar 20, 2026
@renovate renovate bot deleted the renovate/packagist-league-commonmark-vulnerability branch March 20, 2026 22:17
| datasource | package           | from  | to    |
| ---------- | ----------------- | ----- | ----- |
| packagist  | league/commonmark | 2.7.1 | 2.8.2 |


Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@renovate renovate bot changed the title Update dependency league/commonmark to ^2.8.2 [SECURITY] - autoclosed Update dependency league/commonmark to ^2.8.2 [SECURITY] Mar 21, 2026
@renovate renovate bot reopened this Mar 21, 2026
@renovate renovate bot force-pushed the renovate/packagist-league-commonmark-vulnerability branch 2 times, most recently from a8d9f71 to 15451be Compare March 21, 2026 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants