Логотип exploitDog
Консоль
Логотип exploitDog

exploitDog

github логотип

GHSA-c2pc-g5qf-rfrf

Опубликовано: 09 дек. 2024
Источник: github
Github: Прошло ревью
CVSS3: 7.5

Описание

league/commonmark's quadratic complexity bugs may lead to a denial of service

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:

Пакеты

Наименование

league/commonmark

composer
Затронутые версииВерсия исправления

< 2.6.0

2.6.0

7.5 High

CVSS3

Дефекты

CWE-407

7.5 High

CVSS3

Дефекты

CWE-407