ID CVE-2021-41816
Summary 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.
References
Vulnerable Configurations
  • cpe:2.3:a:ruby-lang:cgi:0.1.0:*:*:*:*:ruby:*:*
    cpe:2.3:a:ruby-lang:cgi:0.1.0:*:*:*:*:ruby:*:*
  • cpe:2.3:a:ruby-lang:cgi:0.1.1:*:*:*:*:ruby:*:*
    cpe:2.3:a:ruby-lang:cgi:0.1.1:*:*:*:*:ruby:*:*
  • cpe:2.3:a:ruby-lang:cgi:0.2.0:*:*:*:*:ruby:*:*
    cpe:2.3:a:ruby-lang:cgi:0.2.0:*:*:*:*:ruby:*:*
  • cpe:2.3:a:ruby-lang:cgi:0.2.1:*:*:*:*:ruby:*:*
    cpe:2.3:a:ruby-lang:cgi:0.2.1:*:*:*:*:ruby:*:*
  • cpe:2.3:a:ruby-lang:cgi:0.3.0:*:*:*:*:ruby:*:*
    cpe:2.3:a:ruby-lang:cgi:0.3.0:*:*:*:*:ruby:*:*
  • cpe:2.3:a:ruby-lang:ruby:*:*:*:*:*:*:*:*
    cpe:2.3:a:ruby-lang:ruby:*:*:*:*:*:*:*:*
  • cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:*
    cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:*
  • cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:*
    cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:*
CVSS
Base: 7.5 (as of 24-01-2024 - 05:15)
Impact:
Exploitability:
CWE CWE-190
CAPEC
  • Forced Integer Overflow
    This attack forces an integer variable to go out of range. The integer variable is often used as an offset such as size of memory allocation or similarly. The attacker would typically control the value of such variable and try to get it out of range. For instance the integer in question is incremented past the maximum possible value, it may wrap to become a very small, or negative number, therefore providing a very incorrect value which can lead to unexpected behavior. At worst the attacker can execute arbitrary code.
Access
VectorComplexityAuthentication
NETWORK LOW NONE
Impact
ConfidentialityIntegrityAvailability
PARTIAL PARTIAL PARTIAL
cvss-vector via4 AV:N/AC:L/Au:N/C:P/I:P/A:P
Last major update 24-01-2024 - 05:15
Published 06-02-2022 - 21:15
Last modified 24-01-2024 - 05:15
Back to Top