Lucene search

K
rubygemsRubySecRUBY:CGI-2021-41816
HistoryNov 23, 2021 - 9:00 p.m.

Buffer Overrun in CGI.escape_html

2021-11-2321:00:00
RubySec
www.ruby-lang.org
10
cgi.escape_html
buffer overflow
gem update
ruby 2.7.5
ruby 3.0.3
vulnerability

CVSS2

7.5

Attack Vector

NETWORK

Attack Complexity

LOW

Authentication

NONE

Confidentiality Impact

PARTIAL

Integrity Impact

PARTIAL

Availability Impact

PARTIAL

AV:N/AC:L/Au:N/C:P/I:P/A:P

CVSS3

9.8

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

NONE

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

HIGH

Integrity Impact

HIGH

Availability Impact

HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

EPSS

0.012

Percentile

85.8%

A security vulnerability that causes buffer overflow when you pass a very large
string (> 700 MB) to CGI.escape_html on a platform where long type takes 4 bytes,
typically, Windows.

Please update the cgi gem to version 0.3.1, 0.2.1, and 0.1.1 or later. You can use
gem update cgi to update it. If you are using bundler, please add gem "cgi", ">= 0.3.1" to your Gemfile. Alternatively, please update Ruby to 2.7.5 or 3.0.3.

This issue has been introduced since Ruby 2.7, so the cgi version bundled with Ruby
2.6 is not vulnerable.

Affected configurations

Vulners
Node
rubycgiRange0.1.00.1.0.1
OR
rubycgiRange0.1.00.1.1
OR
rubycgiRange0.2.00.2.1
OR
rubycgiRange0.3.1
VendorProductVersionCPE
rubycgi*cpe:2.3:a:ruby:cgi:*:*:*:*:*:*:*:*

CVSS2

7.5

Attack Vector

NETWORK

Attack Complexity

LOW

Authentication

NONE

Confidentiality Impact

PARTIAL

Integrity Impact

PARTIAL

Availability Impact

PARTIAL

AV:N/AC:L/Au:N/C:P/I:P/A:P

CVSS3

9.8

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

NONE

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

HIGH

Integrity Impact

HIGH

Availability Impact

HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

EPSS

0.012

Percentile

85.8%