CVE-2020-26298 — Injection/XSS in redcarpet — CVE Details
MEDIUM
Injection/XSS in Redcarpet
Published January 11, 2021Updated July 8, 2026Source: osv
Summary
Redcarpet is a Ruby library for Markdown processing. In Redcarpet before version 3.5.1, there is an injection vulnerability which can enable a cross-site scripting attack. In affected versions no HTML escaping was being performed when processing quotes. This applies even when the `:escape_html` option was being used. This is fixed in version 3.5.1 by the referenced commit.
Advisory Timeline
- First published January 11, 2021 (2100 days ago).
- Last revised July 8, 2026 — 2003 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
Bundler
Update redcarpet to 3.5.1 or latergem install redcarpet -v 3.5.1
After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.
Affected Packages (1)
Affects 1 ecosystem: rubygems (1).
| Package | Ecosystem | Affected | Fixed In |
|---|---|---|---|
| redcarpet | rubygems | 1.0.0, 1.0.1, 1.1.0, 1.1.1 (+68 more) | 3.5.1 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-74
- CWE-79Cross-site Scripting (XSS)MITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 6.8 score means for each attack dimension.
Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
Required
Scope
Changed
Confidentiality
None
Integrity
High
Availability
None
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:N/I:H/A:N
References
- https://nvd.nist.gov/vuln/detail/CVE-2020-26298ADVISORY
- https://github.com/vmg/redcarpet/commit/a699c82292b17c8e6a62e1914d5eccc252272793WEB
- https://github.com/advisories/GHSA-q3wr-qw3g-3p4hADVISORY
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/redcarpet/CVE-2020-26298.ymlWEB
- https://github.com/vmg/redcarpetPACKAGE
- https://github.com/vmg/redcarpet/blob/master/CHANGELOG.md#version-351-securityWEB
- https://lists.debian.org/debian-lts-announce/2021/01/msg00014.htmlWEB
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/BFMYDIONVWATY7EB6EARDVXT47AYCRNMWEB
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/FNO4ZZUPGAEUXKQL4G2HRIH7CUZKPCT6WEB
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/PXNNWHHAPREDM3XJDACYRTK7DBMUONBIWEB
- https://rubygems.org/gems/redcarpetWEB
- https://www.debian.org/security/2021/dsa-4831WEB
Frequently Asked Questions
- What is CVE-2020-26298?
- Injection/XSS in Redcarpet This vulnerability has been assigned a severity rating of MEDIUM (CVSS score: 6.8/10).
- How do I check if my project is affected by CVE-2020-26298?
- CVE-2020-26298 affects redcarpet. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2020-26298 and 200,000+ other known vulnerabilities.
Severity & Exploitability
CVSS Score
6.8
Exploitation requires specific conditions or has limited impact. Remediate within weeks.
Also Known As
GHSA-q3wr-qw3g-3p4h
Related CVEs
- CVE-2026-107715MEDIUM
Mechanize sends credential headers to another host after an HTTP redirect
- CVE-2026-107399MEDIUM
Mechanize sends credential headers to another origin after a meta refresh
Check if you're affected
Scan your dependencies to see if this vulnerability affects your projects.
Scan Your Dependencies