GHSA-4qw4-jpp4-8gvp Unbounded resource exhaustion in cmark-gfm autolink extension may lead to denial of service
Attackers can cause denial of service via resource exhaustion in the cmark-gfm autolink extension used by CommonMarker.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is GHSA-4qw4-jpp4-8gvp?
GHSA-4qw4-jpp4-8gvp is a denial of service vulnerability in commonmarker, published on 21 Sep 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
Impact
CommonMarker uses cmark-gfm for rendering Github Flavored Markdown. A polynomial time complexity issue in cmark-gfm's autolink extension may lead to unbounded resource exhaustion and subsequent denial of service.
Patches
This vulnerability has been patched in the following CommonMarker release:
- v0.23.6
Workarounds
Disable use of the autolink extension.
References
https://github.com/gjtorikian/commonmarker/pull/190 https://github.com/github/cmark-gfm/security/advisories/GHSA-cgh3-p57x-9q7q https://en.wikipedia.org/wiki/Time_complexity
For more information
If you have any questions or comments about this advisory:
- Open an issue in github/cmark-gfm
Acknowledgements
We would like to thank Legit Security for reporting this vulnerability.
Which versions are affected by GHSA-4qw4-jpp4-8gvp?
2 open source packages ship an affected version, including commonmarker.
| Package | Affected | Fixed in |
|---|---|---|
commonmarker RubyGems | All versions | 0.23.6 |
commonmarker RubyGems | All versions | 0.23.6 |
How do I fix GHSA-4qw4-jpp4-8gvp?
Upgrade commonmarker to 0.23.6 or later.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is GHSA-4qw4-jpp4-8gvp being exploited?
There is no known exploitation of GHSA-4qw4-jpp4-8gvp in the wild and no public exploit code.