Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency league/commonmark to v2.6.0 [SECURITY] - autoclosed #63

Closed

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Dec 10, 2024

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
league/commonmark (source) 2.5.3 -> 2.6.0 age adoption passing confidence

GitHub 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:

  • Setting very low memory_limit and max_execution_time PHP configurations to prevent runaway resource usage
  • Implementing rate-limiting, bot protection, or other approaches to reduce the risk of simultaneous bad requests hitting your site
  • Limiting the size of inputs fed into this library (specifically the max length of each line)
  • Limiting the use of this library to trusted users

References

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:


Release Notes

thephpleague/commonmark (league/commonmark)

v2.6.0

Compare 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
  • Added max_delimiters_per_line config option to prevent denial of service attacks when parsing malicious input
  • Added table/max_autocompleted_cells config option to prevent denial of service attacks when parsing large tables
  • The AttributesExtension now supports attributes without values (#​985, #​986)
  • The AutolinkExtension exposes two new configuration options to override the default behavior (#​969, #​987):
    • autolink/allowed_protocols - an array of protocols to allow autolinking for
    • autolink/default_protocol - the default protocol to use when none is specified
  • Added RegexHelper::isWhitespace() method to check if a given character is an ASCII whitespace character
  • Added CacheableDelimiterProcessorInterface to ensure linear complexity for dynamic delimiter processing
  • Added Bracket delimiter type to optimize bracket parsing
Changed
  • [ and ] are no longer added as Delimiter objects on the stack; a new Bracket type with its own stack is used instead
  • UrlAutolinkParser no longer parses URLs with more than 127 subdomains
  • Expanded reference links can no longer exceed 100kb, or the size of the input document (whichever is greater)
  • Delimiters should always provide a non-null value via DelimiterInterface::getIndex()
    • We'll attempt to infer the index based on surrounding delimiters where possible
  • The DelimiterStack now accepts integer positions for any $stackBottom argument
  • Several small performance optimizations

Configuration

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

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

Rebasing: Whenever PR becomes conflicted, 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

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot changed the title Update dependency league/commonmark to v2.6.0 [SECURITY] Update dependency league/commonmark to v2.6.0 [SECURITY] - autoclosed Dec 18, 2024
@renovate renovate bot closed this Dec 18, 2024
@renovate renovate bot deleted the renovate/packagist-league-commonmark-vulnerability branch December 18, 2024 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants