On screens that convert user-written Markdown to HTML for display, such as announcements, comments, inquiry bodies, and internal wikis, a single conversion setting can let raw HTML or dangerous links be output as is. One of the libraries that handles this conversion in PHP is league/commonmark, which Laravel's Str::markdown() also uses internally. This library released 2.10.8 on November 24 and 2.10.9 on November 25.
The changelog lists three processing-time problems with advisory numbers (GHSA), and a fix without an advisory number for a problem where "writing attribute names in uppercase could overwrite link targets and image sources." Which of these apply to your screens depends on the conversion settings, the extensions you have added, the PHP environment, and the size of the input.
In this article, based on the changelog, advisories, fix commits, tests, and documentation source in the league/commonmark repository, we sort out the conditions under which the issues apply and the steps to check. The three advisories were published in the repository at the same time as the fixed versions (the two for 2.10.8 on November 24, 15:45, and the one for 2.10.9 on November 25, 20:11 (UTC)). However, as of November 26, they are not listed in Packagist's advisory API or GitHub's advisory database.
What was fixed in 2.10.8 and 2.10.9
According to Packagist, 2.10.8 was released on November 24, 15:44 (UTC), and 2.10.9 on November 25, 20:08 (UTC). The previous version, 2.10.7, was released on October 31. As of November 26, 2.10.9 is the latest.
| Release | Fix (per the changelog) | Severity | Conditions under which it applies (per the advisory) |
|---|---|---|---|
| 2.10.8 | GHSA-h4px-59g8-q37c: Long runs of _ or * deepen emphasis nesting, and rendering takes quadratic time | Low | Regardless of settings. Even with max_delimiters_per_line set, a run was counted as one |
| 2.10.8 | GHSA-8q9g-2c37-97xp: On lines with many unclosed {, attribute parsing backtracks excessively | Medium | AttributesExtension is added |
| 2.10.9 | GHSA-jj45-w5cj-2hc8: Processing time grows long with inline HTML comments, URL autolinks, and more | Medium | Paragraphs of about 500KB or more even with default settings. PCRE JIT disabled, GFM autolinks with PHP 8.2 or earlier, and others |
| 2.10.9 | #1176: Uppercase attribute names such as {HREF=...} take precedence in browsers over attributes set by the renderer | No advisory | AttributesExtension is added |
| 2.10.9 | #1177: When a regular expression hits the PCRE limit, raw HTML stripping and dangerous link checks are bypassed | No advisory | DisallowedRawHtmlExtension or allow_unsafe_links is used |
For severity, each advisory's "low" is shown as Low and "medium" as Medium.
The GHSA-jj45-w5cj-2hc8 advisory lists three cases. The first is with default settings (JIT enabled), where parsing a paragraph of about 500KB or more, in which a declaration starting with <! is followed by a long run of letters, takes about one minute. This happens even without extensions. The second is GFM autolinks: in 2.9.0 and later, only on PHP 7.4–8.2, lines with many www. and similar take quadratic time. The third is environments with JIT disabled (pcre.jit=0), where inline HTML comments, autolinks, footnotes, and more take quadratic time. According to the advisory, with JIT disabled, the mitigations for vulnerabilities disclosed in 2023 (CVE-2023-22483 and CVE-2023-22484) could also be bypassed with only slight changes to the input.
According to the GHSA-8q9g-2c37-97xp advisory, even with default settings, a single 24KB line takes more than 20 seconds. Advisories about AttributesExtension processing time were also issued in August (GHSA-g2gp-3wwq-f4ph, GHSA-jjv6-8j6v-6j52, GHSA-8rr7-cvq3-gmfh), but the advisory explains that this one is a different processing path. Even if you applied the earlier fixes, you need to update to this release.

Uppercase attribute names could overwrite link targets (#1176)
AttributesExtension is an extension that lets you add HTML attributes from within Markdown, as in [リンク](https://example.com){target=_blank}. Before the fix, it output attribute names with their uppercase and lowercase letters unchanged.
A comment in the fix commit explains the reason: "Browsers keep only the first of two names differing in case, and user attributes are rendered before those added by renderers and other extensions." Because HTML attribute names are case-insensitive, when HREF and href appear together, the browser uses the one that comes first. Attributes written in the document come before those added by the renderer, so a user-written HREF won over the link's original href.
The added test confirms that after the fix, the original targets remain for the following input.
[l](http://ok.com){HREF="http://evil.com"}
{SRC="http://evil.com/b.png"}
[l](http://ext.com){TARGET=_self}
The first line becomes <a href="http://ok.com">, and the second becomes <img src="http://ok.com/a.png" ...>. In the third line, the target="_blank" from the setting that opens external links in a new tab (ExternalLinkExtension) remains. The changelog says that the footnote reference href and HeadingPermalinkExtension's id could likewise be overwritten.
After the fix, attribute names are normalized to lowercase. The list of allowed attributes (attributes/allow) is also no longer case-sensitive. According to the changelog, entries previously written as 'ID' or 'CLASS' did not match #id or .class.
This issue has no advisory number. However, the editorial team believes that the ability to replace a link target with a different URL through user-written Markdown cannot be overlooked on bulletin boards and comment sections that use AttributesExtension.
What settings can and cannot prevent
league/commonmark's default settings are not on the safe side, because they follow the CommonMark specification. The descriptions in the configuration documentation (docs/2.x/configuration.md) and the security page (docs/2.x/security.md) can be summarized as follows.
| Configuration | Defaults | Guidance for handling user input |
|---|---|---|
html_input | allow (outputs raw HTML as is) | "Strongly" recommends escape or strip |
allow_unsafe_links | true | false to remove javascript: and the like |
max_nesting_level | PHP_INT_MAX | 100 |
max_delimiters_per_line | PHP_INT_MAX | Around 100–1000 depending on the use case |
However, these settings do not prevent the current processing-time problems. The GHSA-jj45-w5cj-2hc8 and GHSA-8q9g-2c37-97xp advisories state that the four settings above (and also attributes/allow for 8q9g) do not limit these cases. max_delimiters_per_line became able to prevent the emphasis issue only after its counting was fixed in 2.10.8. The advisory also states that while PHP's max_execution_time stops long conversions in web requests, CLI scripts and queue workers have no time limit by default.
In 2.10.9, a "PCRE JIT and Input Size" section was added to the security page. It advises checking whether ini_get('pcre.jit') is "1" in the SAPI that actually handles requests, or whether "PCRE JIT Support => enabled" appears in phpinfo(). It says JIT is effectively disabled if the settings differ between CLI and FPM, or if "Allocation of JIT memory failed" appears in the logs. For input size, it recommends limiting not only line length but the whole input to what the use case requires. The GHSA-jj45-w5cj-2hc8 advisory states that in 2.9.0 and later, apps on PHP 8.3 or later with JIT enabled that limit user Markdown to under about 100KB per paragraph are effectively unaffected.
AttributesExtension is not part of the GFM (GitHub Flavored Markdown) extension bundle. What GithubFlavoredMarkdownExtension adds in 2.10.9 is autolinks, partial raw HTML stripping (DisallowedRawHtml), strikethrough, tables, and task lists. The two attribute issues apply to code that adds AttributesExtension itself.
How it is used in Laravel
The composer.json of Laravel 13.x requires "league/commonmark": "^2.8.1". 2.10.9 falls within this range, so you can update with composer update league/commonmark without upgrading Laravel itself.
Str::markdown()andstr()->markdown(): Usenew GithubFlavoredMarkdownConverter($options). If no options are passed, the defaults in the table above remain (html_inputisallow, andallow_unsafe_linksistrue)Str::inlineMarkdown(): Conversion with InlinesOnlyExtension added to the GFM extensions. Settings are handled the same way- Markdown mail (
Illuminate\Mail\Markdown): Setsallow_unsafe_linkstofalseand uses the CommonMark core and the table extension
Str::markdown() is a GFM conversion, so it includes autolinks and is subject to GHSA-jj45-w5cj-2hc8. AttributesExtension is not included unless added through an argument.
For screens that pass user input to Str::markdown(), it is worth checking whether options are specified. For example, you can specify them as follows (example by the editorial team). Even this does not prevent the three processing-time issues, so updating the library and limiting input size are needed separately.
Str::markdown($post->body, [
'html_input' => 'escape',
'allow_unsafe_links' => false,
'max_nesting_level' => 100,
'max_delimiters_per_line' => 1000,
]);
Note that Laravel 13.44.0, released on November 24, includes "Fix attribute escaping in secured Markdown mail" (#62597). This change fixes, on the Laravel side, the escaping of values embedded in Markdown mail templates, and is separate from the current league/commonmark fixes. For Markdown mail, advisory GHSA-5xc4-gpwg-p8wq (severity: low) was also published in the Laravel repository on November 18. It concerns protection not taking effect, even when using Markdown::withSecuredEncoding(), if views were pre-generated with php artisan view:cache or similar, and it was fixed in 13.43.0 and 12.73.0. This is also separate from league/commonmark.
Steps to check (editorial suggestion)
- Check the version. Use
composer show league/commonmarkto see whether it is earlier than 2.10.9. These three issues are not listed in the advisory databases, so if you wait forcomposer auditor Dependabot notifications, you may not notice them - List the places that do conversion. Find candidates with the following expression and check one by one whether user-written strings reach them
grep -rnE "Str::markdown|inlineMarkdown|->markdown\(|CommonMarkConverter|GithubFlavoredMarkdownConverter|MarkdownConverter|AttributesExtension" app/ src/ resources/
- Review the settings. Check whether conversions that handle user input specify the four settings in the table above. If you use AttributesExtension, allow only the attributes you need with
attributes/allow - Check JIT and input size. Check
pcre.jitin production FPM, and set upper limits on body size in forms and APIs. If you convert in queue workers or the CLI, also keep in mind that there is no time limit - Update and check the display. From 2.10.8,
max_delimiters_per_linecounts the characters one by one, so with low values, emphasis may be output as plain characters. Attribute lists over 8192 bytes and malformed attribute lists also remain as plain text. If raw HTML is allowed (allow), in 2.10.9 genuine tags after an escaped<or a code span are output as HTML
Scope of verification
On November 26, 2026, we checked the changelog (CHANGELOG.md) for tags 2.10.7 to 2.10.9 of thephpleague/commonmark, the descriptions, diffs, and tests of the fix commits (71c0cc8, 11a4613, 0773fc7, 5d3c1af, eb20850, 2dd9abf), the documentation source (docs/2.x/security.md, configuration.md, extensions/attributes.md) and the security page on the documentation site, and Packagist's publication dates and times and advisory API. We checked the text, severity, affected versions, and publication dates and times of the three advisories by opening the repository's advisories through the GitHub API. We also confirmed via the API on November 26 that the three are not listed in GitHub's advisory database. For Laravel, we checked composer.json,
Str.php, andMail/Markdown.phpin laravel/framework 13.x, commit 90e6a60, and advisory GHSA-5xc4-gpwg-p8wq (desk research). We have not checked reproductions of each issue, the processing times stated in the advisories, or the behavior of the versions before and after the fixes.
We covered PHP CMS updates in our baserCMS article, the advisory for a Laravel admin panel component in our Filament Curator article, and processing-time problems in a component that removes dangerous markup from user input in our .NET HtmlSanitizer article.
For maintenance of Laravel sites and business systems with screens where users post content, or how to approach library updates, please contact us through Development, AI, and automation consultation.
References
- thephpleague/commonmark — CHANGELOG.md (2.10.8 and 2.10.9)
- GHSA-jj45-w5cj-2hc8 — Inefficient regular expressions allow denial of service, especially with PCRE JIT disabled
- GHSA-8q9g-2c37-97xp — Excessive backtracking in AttributesExtension attribute list parsing
- GHSA-h4px-59g8-q37c — max_delimiters_per_line undercounted long delimiter runs
- thephpleague/commonmark — Lowercase attribute names parsed by AttributesExtension(#1176)
- thephpleague/commonmark — Don’t let PCRE limits silently change how long lines are parsed(#1177)
- thephpleague/commonmark — Count each delimiter character against max_delimiters_per_line
- thephpleague/commonmark — Prevent excessive backtracking when parsing attribute lists
- league/commonmark — Security(2.x)
- league/commonmark(Packagist)
- laravel/framework — src/Illuminate/Support/Str.php(13.x)
- laravel/framework — Fix attribute escaping in secured Markdown mail(#62597)
- laravel/framework — GHSA-5xc4-gpwg-p8wq









