Vulnerability · Published Feb 6, 2022 · Assigned by mitre
CVE-2021-41816
Critical 9.8
In plain English
A critical-severity security flaw in the ruby package (Alpine). There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 4.9% (higher than 92% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Severity (CVSS NVD)9.8Critical
Exploit odds (30 days)4.9%top 7.9% of all CVEs
Exploited in the wildNo reportsnot in CISA KEV
Attack toolingNoneno public tooling known
Official 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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine:v3.20 | ruby | 3.0.3-r0 | ALPINE-CVE-2021-41816 |
| Alpine:v3.21 | ruby | 3.0.3-r0 | ALPINE-CVE-2021-41816 |
| Alpine:v3.22 | ruby | 3.0.3-r0 | ALPINE-CVE-2021-41816 |
| Alpine:v3.23 | ruby | 3.0.3-r0 | ALPINE-CVE-2021-41816 |
| Alpine:v3.24 | ruby | 3.0.3-r0 | ALPINE-CVE-2021-41816 |
| RubyGems | cgi | 0.3.1 | GHSA-5cqm-crxm-6qpv |
| RubyGems | cgi | 0.2.1 | GHSA-5cqm-crxm-6qpv |
| RubyGems | cgi | 0.1.0.1 | GHSA-5cqm-crxm-6qpv |
| Ubuntu:22.04:LTS | ruby3.0 | 3.0.2-7ubuntu2 | UBUNTU-CVE-2021-41816 |
Affected products (as reported)
References
- https://hackerone.com/reports/1328463
- https://www.ruby-lang.org/en/news/2021/11/24/buffer-overrun-in-cgi-escape_html-cve-2021-41816/
- https://security-tracker.debian.org/tracker/CVE-2021-41816
- https://security.netapp.com/advisory/ntap-20220303-0006/
- FEDORA-2022-82a9edac27 vendor-advisory
- FEDORA-2022-8cf0124add vendor-advisory
- GLSA-202401-27 vendor-advisory