Vulnerability in Commonmarker RubyGem: Denial of Service due to Quadratic Complexity Bugs
Summary
GHSA-48wp-p9qv-4j64: Commonmarker vulnerable to to several quadratic complexity bugs that may lead to denial of service. Affects commonmarker versions < 0.23.9. Fixed in 0.23.9. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
Commonmarker is a RubyGem that provides a wrapper around the cmark-gfm library, allowing users to parse and render Markdown documents. It is widely used in Ruby applications for processing Markdown content. However, several quadratic complexity bugs have been discovered in the underlying cmark-gfm library, which can lead to unbounded resource exhaustion and subsequent denial of service.
Vulnerability Detail
The vulnerabilities in the cmark-gfm library used by Commonmarker are caused by quadratic complexity bugs. These bugs can be exploited to perform operations that require a significant amount of time and resources, leading to a denial of service. An attacker could craft malicious Markdown content that triggers these bugs, causing the application to consume excessive CPU and memory, ultimately rendering it unresponsive. The vulnerabilities have been assigned the following CVE identifiers: CVE-2023-24824 and CVE-2023-26485.
How To Fix
Minimum fixed version
0.23.9
This is the first release that contains the fix.
gem install commonmarker -v 0.23.9
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
There are no known workarounds for these vulnerabilities. It is crucial to upgrade to the fixed version of Commonmarker to mitigate the risk of denial of service attacks.
Conclusion
Commonmarker RubyGem is vulnerable to denial of service attacks due to quadratic complexity bugs in the underlying cmark-gfm library. To mitigate this risk, it is crucial to upgrade to Commonmarker version 0.23.9. For further assistance and support in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for commonmarker →
FAQ
Commonmarker is a RubyGem that provides a convenient way to parse and render Markdown documents in Ruby applications.
The vulnerabilities in Commonmarker's underlying cmark-gfm library can be exploited to perform denial of service attacks, rendering the affected application unresponsive.
To fix the vulnerabilities, upgrade to Commonmarker version 0.23.9 by specifying it in your Gemfile and running bundle install.
No, there are no known workarounds for these vulnerabilities. Upgrading to the fixed version is the recommended solution.
You can find more information about the vulnerabilities in the release notes for Commonmarker version 0.23.9 and the corresponding CVE advisories.
References
Related vulnerabilities
Recent vulnerabilities recorded for commonmarker.
Follow Vulert in Google
Get more Vulert vulnerability and dependency-security updates in Google Search and AI results.