Severity
9.8CRITICALNVD
EPSS
0.5%
top 34.77%
CISA KEV
Not in KEV
Exploit
No known exploits
Timeline
PublishedFeb 6

Description

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.

CVSS vector

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HExploitability: 3.9 | Impact: 5.9

Affected Packages2 packages

NVDruby-lang/cgi< 0.3.1+2
RubyGemsruby-lang/cgi0.3.00.3.1+2

Also affects: Fedora 34, 35

🔴Vulnerability Details

5
OSV
CVE-2021-41816: CGI2022-02-06
CVEList
CVE-2021-41816: CGI2022-02-06
OSV
ruby2.3, ruby2.5, ruby2.7 vulnerabilities2022-01-18
OSV
Buffer overrun in CGI.escape_html2021-12-14
GHSA
Buffer overrun in CGI.escape_html2021-12-14

📋Vendor Advisories

3
Ubuntu
Ruby vulnerabilities2022-01-18
Red Hat
ruby: buffer overflow in CGI.escape_html2021-11-24
Debian
CVE-2021-41816: ruby2.7 - CGI.escape_html in Ruby before 2.7.5 and 3.x before 3.0.3 has an integer overflo...2021
CVE-2021-41816 — Integer Overflow or Wraparound in CGI | cvebase