Vulnerability Name:

CVE-2021-41816 (CCN-220102)

Assigned:2021-11-24
Published:2021-11-24
Updated:2022-09-10
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.
CVSS v3 Severity:9.8 Critical (CVSS v3.1 Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H)
8.5 High (Temporal CVSS v3.1 Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:U/RL:O/RC:C)
Exploitability Metrics:Attack Vector (AV): Network
Attack Complexity (AC): Low
Privileges Required (PR): None
User Interaction (UI): None
Scope:Scope (S): Unchanged
Impact Metrics:Confidentiality (C): High
Integrity (I): High
Availibility (A): High
9.8 Critical (CCN CVSS v3.1 Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H)
8.5 High (CCN Temporal CVSS v3.1 Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:U/RL:O/RC:C)
Exploitability Metrics:Attack Vector (AV): Network
Attack Complexity (AC): Low
Privileges Required (PR): None
User Interaction (UI): None
Scope:Scope (S): Unchanged
Impact Metrics:Confidentiality (C): High
Integrity (I): High
Availibility (A): High
CVSS v2 Severity:7.5 High (CVSS v2 Vector: AV:N/AC:L/Au:N/C:P/I:P/A:P)
Exploitability Metrics:Access Vector (AV): Network
Access Complexity (AC): Low
Authentication (Au): None
Impact Metrics:Confidentiality (C): Partial
Integrity (I): Partial
Availibility (A): Partial
10.0 High (CCN CVSS v2 Vector: AV:N/AC:L/Au:N/C:C/I:C/A:C)
Exploitability Metrics:Access Vector (AV): Network
Access Complexity (AC): Low
Athentication (Au): None
Impact Metrics:Confidentiality (C): Complete
Integrity (I): Complete
Availibility (A): Complete
Vulnerability Type:CWE-190
Vulnerability Consequences:Gain Access
References:Source: MITRE
Type: CNA
CVE-2021-41816

Source: XF
Type: UNKNOWN
ruby-cve202141816-bo(220102)

Source: MISC
Type: Permissions Required, Third Party Advisory
https://hackerone.com/reports/1328463

Source: FEDORA
Type: Mailing List, Third Party Advisory
FEDORA-2022-82a9edac27

Source: FEDORA
Type: Mailing List, Third Party Advisory
FEDORA-2022-8cf0124add

Source: MISC
Type: Third Party Advisory
https://security-tracker.debian.org/tracker/CVE-2021-41816

Source: CONFIRM
Type: Third Party Advisory
https://security.netapp.com/advisory/ntap-20220303-0006/

Source: CCN
Type: IBM Security Bulletin 6982841 (Netcool Operations Insight)
Netcool Operations Insight v1.6.8 addresses multiple security vulnerabilities.

Source: CCN
Type: Ruby Web site
CVE-2021-41816: Buffer Overrun in CGI.escape_html

Source: CONFIRM
Type: Exploit, Vendor Advisory
https://www.ruby-lang.org/en/news/2021/11/24/buffer-overrun-in-cgi-escape_html-cve-2021-41816/

Vulnerable Configuration:Configuration 1:
  • cpe:/a:ruby-lang:cgi:*:*:*:*:*:ruby:*:* (Version < 0.3.1)

  • Configuration 2:
  • cpe:/a:ruby-lang:cgi:*:*:*:*:*:ruby:*:* (Version <= 0.2.0)
  • AND
  • cpe:/a:ruby-lang:ruby:*:*:*:*:*:*:*:* (Version >= 3.0.0 and < 3.0.3)

  • Configuration 3:
  • cpe:/a:ruby-lang:cgi:*:*:*:*:*:ruby:*:* (Version <= 0.1.0)
  • AND
  • cpe:/a:ruby-lang:ruby:*:*:*:*:*:*:*:* (Version >= 2.7.0 and < 2.7.5)

  • Configuration 4:
  • cpe:/o:fedoraproject:fedora:34:*:*:*:*:*:*:*
  • OR cpe:/o:fedoraproject:fedora:35:*:*:*:*:*:*:*

  • Configuration CCN 1:
  • cpe:/a:recurly:recurly_client_ruby:2.7.4:*:*:*:*:*:*:*
  • OR cpe:/a:mislav_marohnic:will_paginate:3.0.2:-:-:*:-:ruby:*:*

  • * Denotes that component is vulnerable
    Oval Definitions
    Definition IDClassTitleLast Modified
    oval:org.opensuse.security:def:112816
    P
    libruby2_7-2_7-2.7.5-1.1 on GA media (Moderate)
    2022-01-17
    oval:org.opensuse.security:def:112819
    P
    libruby3_0-3_0-3.0.3-1.1 on GA media (Moderate)
    2022-01-17
    BACK
    ruby-lang cgi *
    ruby-lang cgi *
    ruby-lang ruby *
    ruby-lang cgi *
    ruby-lang ruby *
    fedoraproject fedora 34
    fedoraproject fedora 35
    recurly recurly client ruby 2.7.4
    mislav_marohnic will paginate 3.0.2 -