CVE-2026-35201: rdiscount Out-of-bounds Read Vulnerability

rdiscount Updated 06 Apr 2026

Summary

06/04/2026
Yes i
Moderate
5.9

CVE-2026-35201: rdiscount has an Out-of-bounds Read. Affects rdiscount versions >= 1.3.1.1, < 2.2.7.4. Fixed in 2.2.7.4. How to fix ↓

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

rdiscount is a Ruby library used for parsing Markdown into HTML. It is known for its speed and efficiency in converting Markdown text into formatted HTML. However, it has a vulnerability that can lead to an out-of-bounds read, potentially causing a denial-of-service condition when handling large inputs.

Vulnerability Detail

The vulnerability arises from a signed length truncation bug that allows inputs larger than INT_MAX to be processed incorrectly. When the length of the input exceeds INT_MAX, it is truncated to a negative signed integer, leading the parser to read beyond the allocated buffer. This can cause a segmentation fault and crash the Ruby process. The affected APIs include RDiscount.new(input).to_html and RDiscount.new(input).toc_content, making it critical for applications that parse user-controlled Markdown content.

How To Fix

Minimum fixed version

2.2.7.4

This is the first release that contains the fix.

gem install rdiscount -v 2.2.7.4

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, you can limit the size of the input to the rdiscount parser by validating the input length before processing. For example: if (input.length > MAX_ALLOWED_LENGTH) { raise 'Input too large'; } This will prevent the parser from attempting to process excessively large inputs.

Conclusion

The rdiscount library has a significant vulnerability (CVE-2026-35201) that can lead to an out-of-bounds read and potential denial-of-service. It is crucial to update to the patched version or implement workarounds to ensure the security of applications using this library.

See every vulnerability recorded for rdiscount →

Share this vulnerability

FAQ

The CVSS score of this vulnerability is 5.9, indicating a moderate severity level.

You can use Vulert to monitor and alert for open-source vulnerabilities in your software. Visit the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability.

The primary consequence is a denial-of-service condition, where the application may crash due to an out-of-bounds read, especially when processing large Markdown inputs.

Yes, a patched version of rdiscount is available. You should update to version 2.2.7.4 or later to mitigate this vulnerability.

If an immediate update is not possible, implement input validation to restrict the size of Markdown inputs to prevent triggering the vulnerability.

How To Fix

Minimum fixed version

2.2.7.4

This is the first release that contains the fix.

gem install rdiscount -v 2.2.7.4

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback