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.

INFO

Published Date :

Feb. 6, 2022, 9:15 p.m.

Last Modified :

Nov. 21, 2024, 6:26 a.m.

Remotely Exploitable :

Yes !

Impact Score :

5.9

Exploitability Score :

3.9
Affected Products

The following products are affected by CVE-2021-41816 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Ruby-lang ruby
2 Ruby-lang cgi
1 Fedoraproject fedora
References to Advisories, Solutions, and Tools

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2021-41816 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2021-41816 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • CVE Modified by af854a3a-2127-422b-91ae-364da2661108

    Nov. 21, 2024

    Action Type Old Value New Value
    Added Reference https://hackerone.com/reports/1328463
    Added Reference https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/IUXQCH6FRKANCVZO2Q7D2SQX33FP3KWN/
    Added Reference https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/UTOJGS5IEFDK3UOO7IY4OTTFGHGLSWZF/
    Added Reference https://security.gentoo.org/glsa/202401-27
    Added Reference https://security.netapp.com/advisory/ntap-20220303-0006/
    Added Reference https://security-tracker.debian.org/tracker/CVE-2021-41816
    Added Reference https://www.ruby-lang.org/en/news/2021/11/24/buffer-overrun-in-cgi-escape_html-cve-2021-41816/
  • CVE Modified by [email protected]

    May. 14, 2024

    Action Type Old Value New Value
  • CVE Modified by [email protected]

    Jan. 24, 2024

    Action Type Old Value New Value
    Added Reference MITRE https://security.gentoo.org/glsa/202401-27 [No types assigned]
  • CVE Modified by [email protected]

    Nov. 07, 2023

    Action Type Old Value New Value
    Added Reference MITRE https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/IUXQCH6FRKANCVZO2Q7D2SQX33FP3KWN/ [No types assigned]
    Added Reference MITRE https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/UTOJGS5IEFDK3UOO7IY4OTTFGHGLSWZF/ [No types assigned]
    Removed Reference MITRE https://lists.fedoraproject.org/archives/list/[email protected]/message/UTOJGS5IEFDK3UOO7IY4OTTFGHGLSWZF/
    Removed Reference MITRE https://lists.fedoraproject.org/archives/list/[email protected]/message/IUXQCH6FRKANCVZO2Q7D2SQX33FP3KWN/
  • Modified Analysis by [email protected]

    Sep. 10, 2022

    Action Type Old Value New Value
    Changed Reference Type https://lists.fedoraproject.org/archives/list/[email protected]/message/IUXQCH6FRKANCVZO2Q7D2SQX33FP3KWN/ No Types Assigned https://lists.fedoraproject.org/archives/list/[email protected]/message/IUXQCH6FRKANCVZO2Q7D2SQX33FP3KWN/ Mailing List, Third Party Advisory
    Changed Reference Type https://lists.fedoraproject.org/archives/list/[email protected]/message/UTOJGS5IEFDK3UOO7IY4OTTFGHGLSWZF/ No Types Assigned https://lists.fedoraproject.org/archives/list/[email protected]/message/UTOJGS5IEFDK3UOO7IY4OTTFGHGLSWZF/ Mailing List, Third Party Advisory
    Added CPE Configuration OR *cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:* *cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:*
  • CVE Modified by [email protected]

    May. 08, 2022

    Action Type Old Value New Value
    Added Reference https://lists.fedoraproject.org/archives/list/[email protected]/message/UTOJGS5IEFDK3UOO7IY4OTTFGHGLSWZF/ [No Types Assigned]
    Added Reference https://lists.fedoraproject.org/archives/list/[email protected]/message/IUXQCH6FRKANCVZO2Q7D2SQX33FP3KWN/ [No Types Assigned]
  • Modified Analysis by [email protected]

    Apr. 30, 2022

    Action Type Old Value New Value
    Changed Reference Type https://security.netapp.com/advisory/ntap-20220303-0006/ No Types Assigned https://security.netapp.com/advisory/ntap-20220303-0006/ Third Party Advisory
  • CVE Modified by [email protected]

    Mar. 03, 2022

    Action Type Old Value New Value
    Added Reference https://security.netapp.com/advisory/ntap-20220303-0006/ [No Types Assigned]
  • Initial Analysis by [email protected]

    Feb. 14, 2022

    Action Type Old Value New Value
    Added CVSS V2 NIST (AV:N/AC:L/Au:N/C:P/I:P/A:P)
    Added CVSS V3.1 NIST AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
    Changed Reference Type https://hackerone.com/reports/1328463 No Types Assigned https://hackerone.com/reports/1328463 Permissions Required, Third Party Advisory
    Changed Reference Type https://security-tracker.debian.org/tracker/CVE-2021-41816 No Types Assigned https://security-tracker.debian.org/tracker/CVE-2021-41816 Third Party Advisory
    Changed Reference Type https://www.ruby-lang.org/en/news/2021/11/24/buffer-overrun-in-cgi-escape_html-cve-2021-41816/ No Types Assigned https://www.ruby-lang.org/en/news/2021/11/24/buffer-overrun-in-cgi-escape_html-cve-2021-41816/ Exploit, Vendor Advisory
    Added CWE NIST CWE-190
    Added CPE Configuration OR *cpe:2.3:a:ruby-lang:cgi:*:*:*:*:*:ruby:*:* versions up to (excluding) 0.3.1
    Added CPE Configuration AND OR *cpe:2.3:a:ruby-lang:cgi:*:*:*:*:*:ruby:*:* versions up to (including) 0.2.0 OR cpe:2.3:a:ruby-lang:ruby:*:*:*:*:*:*:*:* versions from (including) 3.0.0 up to (excluding) 3.0.3
    Added CPE Configuration AND OR *cpe:2.3:a:ruby-lang:cgi:*:*:*:*:*:ruby:*:* versions up to (including) 0.1.0 OR cpe:2.3:a:ruby-lang:ruby:*:*:*:*:*:*:*:* versions from (including) 2.7.0 up to (excluding) 2.7.5
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2021-41816 is associated with the following CWEs:

Common Attack Pattern Enumeration and Classification (CAPEC)

Common Attack Pattern Enumeration and Classification (CAPEC) stores attack patterns, which are descriptions of the common attributes and approaches employed by adversaries to exploit the CVE-2021-41816 weaknesses.

Exploit Prediction

EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days.

1.10 }} -0.35%

score

0.84212

percentile

CVSS31 - Vulnerability Scoring System
Attack Vector
Attack Complexity
Privileges Required
User Interaction
Scope
Confidentiality
Integrity
Availability