Integer overflow in Ruby-Lang Cgi
CVE-2021-41816
CGI.escape_html in Ruby before 2.7.5 and 3.x before 3.0.3 has an integer overflow and resultant buffer overflow via a long string on platforms (such as Windows) where size_t and long have different numbers of bytes. This also affects the CGI gem before 0.3.1 for Ruby.
Vulnerability class: Integer Overflow
Published · last modified .
CVSS v3 metric
CVSS v3 base score 9.8 (Critical). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
EPSS exploit prediction
EPSS: 0.049 (92.0th percentile), scored .
Low probability of exploitation in the next 30 days, but still tracked. 92nd percentile — 92.0% of CVEs in the catalogue have a lower EPSS than this one. How to read EPSS.
EPSS over last 30 days · oldest: 0.048 · newest: 0.049 · change: +0.001
Affected products
- Ruby-Lang Cgi
- Ruby-Lang Ruby
- Fedoraproject Fedora — versions 34, 35
Weakness classification (CWE)
Public proof-of-concept exploits
References
- hackerone.com/reports/1328463 (Permissions Required, Third Party Advisory)
- www.ruby-lang.org/en/news/2021/11/24/buffer-overrun-in-cgi-escape_html-cve-2021… (Exploit, Vendor Advisory)
- security-tracker.debian.org/tracker/CVE-2021-41816 (Third Party Advisory)
- security.netapp.com/advisory/ntap-20220303-0006/ (Third Party Advisory)
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/… (vendor-advisory)
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/… (vendor-advisory)
- security.gentoo.org/glsa/202401-27 (vendor-advisory)
Frequently asked questions
- What is CVE-2021-41816?
- CVE-2021-41816 is a critical-severity vulnerability in Ruby-Lang Cgi, classified under Integer Overflow or Wraparound. CVSS score: 9.8/10. Published 2022-02-06.
- How severe is CVE-2021-41816?
- Critical severity. CVSS v3 base score is 9.8 out of 10.
- Is CVE-2021-41816 known to be exploited?
- 2 public proof-of-concept repositories are indexed. Not currently listed in the CISA KEV catalog.