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

- Severity: Medium 5.9 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.29%, higher than 23% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-04-06T17:53:59.000Z
- Modified: 2026-07-24T21:10:00.143Z
- Also known as: GHSA-6r34-94wq-jhrc
- Weaknesses: CWE-125
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- davidfstr rdiscount: >= 1.3.1.1, < 2.2.7.4
- rdiscount (RubyGems): from 1.3.1.1 before 2.2.7.4
- dafoster rdiscount: from 1.3.1.1 before 2.2.7.4

## Every score

- GitHub_M: CVSS:3.1 5.9 Medium `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H`
- GitHub: CVSS:3.1 5.9 Medium `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://github.com/davidfstr/rdiscount/security/advisories/GHSA-6r34-94wq-jhrc> (exploit, vendor-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-35201> (advisory)
- <https://github.com/davidfstr/rdiscount/commit/b1a16445e92e0d12c07594dedcdc56f80b317761> (web)
- <https://github.com/davidfstr/rdiscount> (package)
- <https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rdiscount/CVE-2026-35201.yml> (web)
- <http://github.com/davidfstr/rdiscount/releases/tag/2.2.7.4> (web)

## Sources

- CVE List: [CVE-2026-35201](https://www.cve.org/CVERecord?id=CVE-2026-35201), CVE Terms of Use, modified 2026-04-07
- GitHub Advisory Database: [GHSA-6r34-94wq-jhrc](https://github.com/advisories/GHSA-6r34-94wq-jhrc), CC-BY-4.0, modified 2026-05-13
- NVD: [CVE-2026-35201](https://nvd.nist.gov/vuln/detail/CVE-2026-35201), Public domain, modified 2026-07-24

---

Page: https://cve.day/CVE-2026-35201 · Whole record: https://cve.day/CVE-2026-35201.json · Rebuilt by cve.day 2026-11-25T22:59:18.061Z
