Machine-written summary
Summary written by Claude Haiku from the source advisory. Not reviewed by a person.
The cgi gem for Ruby is vulnerable in versions before 0.1.0.1, from 0.2.0 before 0.2.1, and from 0.3.0 before 0.3.1. An attacker who can get an application to pass a very large string (over 700 MB) to CGI.escape_html on a platform where the long type is 4 bytes, typically Windows, can trigger a buffer overflow. Upgrade to cgi 0.1.0.1, 0.2.1, or 0.3.1, depending on the version you use.
Not analysed yet
We haven’t published our analysis of this Advisory yet. Once a person has reviewed it, this page will say what’s vulnerable, what has to be true for your app to be affected, and how to check.
Severity and exploitation
| Score | Rating | CVSS | Vector | Source |
|---|---|---|---|---|
| 9.8 | Critical | 3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | GitHub Advisory Database |
- CISA KEV Not listed.
- EPSS 0.049, the 92nd percentile, on 9 Nov 2026: FIRST’s estimate of the chance of exploitation in the next 30 days.
Timeline
- 31 Oct 2026, 15:16 UTC First seen by agentprime
- 31 Oct 2026, 15:16 UTC Confirmed by OSV
Sources
- GitHub Advisory Database: GHSA-5cqm-crxm-6qpv
- OSV: GHSA-5cqm-crxm-6qpv
- nvd.nist.gov/vuln/detail/CVE-2021-41816
- github.com/ruby/cgi/commit/959ccf0b6a672bcc64aeaa60c6e1f9e728f1e87f
- github.com/ruby/cgi/commit/ad079c1cb5f58eba1ffac46da79995fcf94a3a6e
- github.com/ruby/cgi/commit/c6a37a671b556eb06140ea89cc465136b24207a6
- github.com/ruby/cgi/commit/c728632c1c09d46cfd4ecbff9caaa3651dd1002a
- hackerone.com/reports/1328463
- www.ruby-lang.org/en/news/2021/11/24/buffer-overrun-in-cgi-escape_html-cve-2021-41816
- security.netapp.com/advisory/ntap-20220303-0006
- security.gentoo.org/glsa/202401-27
- security-tracker.debian.org/tracker/CVE-2021-41816
- lists.fedoraproject.org/archives/list/[email protected]/message/UTOJGS5IEFDK3UOO7IY4OTTFGHGLSWZF
- lists.fedoraproject.org/archives/list/[email protected]/message/IUXQCH6FRKANCVZO2Q7D2SQX33FP3KWN