CVE-2021-41816
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
02 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
03 Exploitation and scoring
- Exploitation
- Not assessed. CISA has not published an exploitation assessment for this record, and it is not in the KEV catalog. That is an absence of assessment, not a finding of no risk.
- SSVC decision
- Not assessed by CISA
- EPSS probability
- 4.89% probability of exploitation activity in the next 30 days.
- EPSS percentile
- Equal to or higher than the score of 91.8% of scored records. A rank, not a probability.
- NVD base score
- 9.8 (CVSS v3.x), scored by the NVD independently of the CNA.
- NVD CVSS vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- NVD analysis status
- Modified. NVD last modified this record on 2026-06-17.
- Red Hat severity
- Moderate. Red Hat's rating for its own products, not a CVSS rating.
Exploit-prediction scores from FIRST. Independent scoring and analysis status from the NVD. Vendor severity from Red Hat. Exploitation assessment and catalog membership from CISA.
04 Metadata
- Published
- 2022-02-06 00:00Z4 YR AGO
- Last updated
- 2024-08-04 03:22Z2 YR AGO
- Reserved
- 2021-09-29
- Assigning CNA
- mitre
- Record state
- PUBLISHED
- Severity
- Not rated by the issuing CNA
- CNA CVSS vector
- Not published by the issuing CNA
- Weaknesses
- Data version
- 5.1
- Document digest
- e555db8877a8eb8995792152837c65821502a5cdee52aa83e6400d9cd74b0464
05 Affected products
06 References
- hackerone.comhttps://hackerone.com/reports/1328463
- www.ruby-lang.orghttps://www.ruby-lang.org/en/news/2021/11/24/buffer-overrun-in-cgi-escape_html-cve-2021-41816/
- security-tracker.debian.orghttps://security-tracker.debian.org/tracker/CVE-2021-41816
- security.netapp.comhttps://security.netapp.com/advisory/ntap-20220303-0006/
- lists.fedoraproject.orgFEDORA-2022-82a9edac27https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/IUXQCH6FRKANCVZO2Q7D2SQX33FP3KWN/
- lists.fedoraproject.orgFEDORA-2022-8cf0124addhttps://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/UTOJGS5IEFDK3UOO7IY4OTTFGHGLSWZF/
- security.gentoo.orgGLSA-202401-27https://security.gentoo.org/glsa/202401-27
07 Fixed in
Arch Linux
- ruby Not affected
Source: Arch Linux Security Tracker, the Arch Linux security team. Reformatted by exploit.cc.
Debian 11
- ruby2.7 Fixed in 2.7.4-1+deb11u1
Source: Debian Security Tracker, the Debian security team. Received through OSV.dev. Reformatted by exploit.cc.
Ubuntu 20.04 LTS
- ruby2.7 Fixed in 2.7.0-5ubuntu1.6
Source: Ubuntu, Canonical Ltd. Licensed under CC BY-SA 4.0. Received through OSV.dev. Reformatted by exploit.cc.
Ubuntu 22.04 LTS
- ruby3.0 Fixed in 3.0.2-7ubuntu2
Source: Ubuntu, Canonical Ltd. Licensed under CC BY-SA 4.0. Received through OSV.dev. Reformatted by exploit.cc.
A release or ecosystem missing from this list has no record here. It may be unaffected or not covered by the source. Source notices and licences.