Update dependency league/commonmark to ^2.8.1 [SECURITY]#71
Open
renovate[bot] wants to merge 1 commit intostagingfrom
Open
Update dependency league/commonmark to ^2.8.1 [SECURITY]#71renovate[bot] wants to merge 1 commit intostagingfrom
renovate[bot] wants to merge 1 commit intostagingfrom
Conversation
07af949 to
3f57b4b
Compare
ff1af75 to
0b70e64
Compare
0b70e64 to
7edd37c
Compare
| datasource | package | from | to | | ---------- | ----------------- | ----- | ----- | | packagist | league/commonmark | 2.4.2 | 2.8.1 | Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
7edd37c to
c38d80f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^2.4.2→^2.8.1GitHub Vulnerability Alerts
GHSA-c2pc-g5qf-rfrf
Impact
Several polynomial time complexity issues in league/commonmark may lead to unbounded resource exhaustion and subsequent denial of service.
Malicious users could trigger that inefficient code with carefully crafted Markdown inputs that are specifically designed to ensure the worst-case performance is reached. Sending multiple such requests in parallel could tie up all available CPU resources and/or PHP-FPM processes, leading to denial of service for legitimate users.
Patches
These vulnerabilities have been patched in version 2.6.0. All users on older versions are highly encouraged to upgrade as soon as possible.
Workarounds
If you cannot upgrade, you may be able to mitigate the issues by:
memory_limitandmax_execution_timePHP configurations to prevent runaway resource usageReferences
Most of these issues were discovered in other Markdown parsers. You can read more about them here:
For general information about this type of issue:
CVE-2025-46734
Summary
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.
Details
The league/commonmark library provides configuration options such as
html_input: 'strip'andallow_unsafe_links: falseto 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:
Which results in the following HTML:
Which causes the JS to execute immediately on page load.
Patches
Version 2.7.0 contains three changes to prevent this XSS attack vector:
onare considered unsafe and blocked by defaulthrefandsrcattributes now respect the existingallow_unsafe_linksconfiguration optionWorkarounds
If upgrading is not feasible, please consider:
AttributesExtensionfor untrusted usersCVE-2026-30838
Impact
The
DisallowedRawHtmlextension 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
DisallowedRawHtmlextension 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
html_inputconfiguration option to'escape'or'strip'to disable all raw HTML, though this is a broader restriction than theDisallowedRawHtmlextension provides.Resources
Release Notes
thephpleague/commonmark (league/commonmark)
v2.8.1Compare Source
This is a security release to address an issue where
DisallowedRawHtmlcan be bypassed, resulting in a possible cross-site scripting (XSS) vulnerability.Fixed
DisallowedRawHtmlRenderernot blocking raw HTML tags with trailing ASCII whitespace (GHSA-4v6x-c7xx-hw9f)v2.8.0Compare Source
Added
HighlightExtensionfor marking important text using==syntax (#1100)Fixed
AutolinkExtensionincorrectly matching URLs after invalidwww.prefix (#1095, #1103)v2.7.1Compare Source
Changed
RegexHelperto improve performance (#674, #1086)Fixed
EmbedProcessorno longer callsupdateEmbeds()when there are no embeds to update (#1081)benchmark.phpCSV path validation for non-existent files (#1068, #1085)v2.7.0Compare Source
This is a security release to address a potential cross-site scripting (XSS) vulnerability when using the
AttributesExtensionwith untrusted user input.Added
attributes/allowconfig option to specify which attributes users are allowed to set on elements (default allows virtually all attributes)Changed
AttributesExtensionblocks all attributes starting withonunless explicitly allowed via theattributes/allowconfig optionallow_unsafe_linksoption is now respected by theAttributesExtensionwhen users specifyhrefandsrcattributesv2.6.2Compare Source
Fixed
v2.6.1Compare Source
Fixed
v2.6.0Compare Source
This is a security release to address potential denial of service attacks when parsing specially crafted,
malicious input from untrusted sources (like user input).
Added
max_delimiters_per_lineconfig option to prevent denial of service attacks when parsing malicious inputtable/max_autocompleted_cellsconfig option to prevent denial of service attacks when parsing large tablesAttributesExtensionnow supports attributes without values (#985, #986)AutolinkExtensionexposes two new configuration options to override the default behavior (#969, #987):autolink/allowed_protocols- an array of protocols to allow autolinking forautolink/default_protocol- the default protocol to use when none is specifiedRegexHelper::isWhitespace()method to check if a given character is an ASCII whitespace characterCacheableDelimiterProcessorInterfaceto ensure linear complexity for dynamic delimiter processingBracketdelimiter type to optimize bracket parsingChanged
[and]are no longer added asDelimiterobjects on the stack; a newBrackettype with its own stack is used insteadUrlAutolinkParserno longer parses URLs with more than 127 subdomainsDelimiterInterface::getIndex()DelimiterStacknow accepts integer positions for any$stackBottomargumentv2.5.3Compare Source
Changed
source, addsearchto list of recognized block tagsv2.5.2Compare Source
Changed
truevalue (#1040)Fixed
v2.5.1Compare Source
Fixed
Tablestart line numbers (#1037)v2.5.0Compare Source
Added
AttributesExtensionnow supports attributes without values (#985, #986)AutolinkExtensionexposes two new configuration options to override the default behavior (#969, #987):autolink/allowed_protocols- an array of protocols to allow autolinking forautolink/default_protocol- the default protocol to use when none is specifiedChanged
Paragraphs only containing link reference definitions will be kept in the AST until theDocumentis finalizedParagraph)Fixed
v2.4.4Compare Source
Fixed
v2.4.3Compare Source
Fixed
UrlAutolinkParserincorrectly parsing text containingwwwanywhere before an autolink (#1025)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.
Read more information about the use of Renovate Bot within Laminas.