Bug 2026752 (CVE-2021-41816) - CVE-2021-41816 ruby: buffer overflow in CGI.escape_html
Summary: CVE-2021-41816 ruby: buffer overflow in CGI.escape_html
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2021-41816
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 2026753 2026754 2026755 2026756 2028506 2028507 2128626 2128634
Blocks: 2026764
TreeView+ depends on / blocked
 
Reported: 2021-11-25 18:05 UTC by Guilherme de Almeida Suckevicz
Modified: 2023-03-16 14:22 UTC (History)
18 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in the ruby. This issue occurs due to improper bounds checking by a buffer overrun in CGI.escape_html. By sending an overly long string using the size_t parameter, a remote attacker could overflow a buffer and execute arbitrary code on the system.
Clone Of:
Environment:
Last Closed: 2022-11-29 14:58:03 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2022:6855 0 None None None 2022-10-11 07:31:26 UTC
Red Hat Product Errata RHSA-2022:6856 0 None None None 2022-10-11 07:32:43 UTC

Description Guilherme de Almeida Suckevicz 2021-11-25 18:05:35 UTC
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.

Reference:
https://www.ruby-lang.org/en/news/2021/11/24/buffer-overrun-in-cgi-escape_html-cve-2021-41816/

Comment 1 Guilherme de Almeida Suckevicz 2021-11-25 18:06:10 UTC
Created ruby tracking bugs for this issue:

Affects: fedora-all [bug 2026754]


Created ruby:2.7/ruby tracking bugs for this issue:

Affects: fedora-all [bug 2026753]


Created ruby:3.0/ruby tracking bugs for this issue:

Affects: fedora-35 [bug 2026756]


Created ruby:master/ruby tracking bugs for this issue:

Affects: fedora-all [bug 2026755]

Comment 3 Garrett Tucker 2021-12-02 14:33:04 UTC
The buffer overflow present in this flaw is only exploitable under circumstances where the system long type is 4 bytes. This would be 32 bit UNIX systems or windows. Due to this, RHEL 7 and above are unaffected by this flaw. RHSCL is affected due to potentially providing software to RHEL6 systems which can be 32 bit.

Comment 4 errata-xmlrpc 2022-10-11 07:31:24 UTC
This issue has been addressed in the following products:

  Red Hat Software Collections for Red Hat Enterprise Linux 7

Via RHSA-2022:6855 https://access.redhat.com/errata/RHSA-2022:6855

Comment 5 errata-xmlrpc 2022-10-11 07:32:41 UTC
This issue has been addressed in the following products:

  Red Hat Software Collections for Red Hat Enterprise Linux 7

Via RHSA-2022:6856 https://access.redhat.com/errata/RHSA-2022:6856

Comment 6 Product Security DevOps Team 2022-11-29 14:58:00 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2021-41816


Note You need to log in before you can comment on or make changes to this bug.