
CVE catalog
CVE-2021-41816
ALPINE-CVE-2021-41816
- Severity
- Critical · CVSS 9.8
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Published
- Updated
- Source
- [NVD] · [CVE record]
- EPSS
- 4.90% · Oct 25, 2026
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.
Vulnerable and fixed packages
Distribution-reported package versions and fixes. These do not depend on matching against the OpenFactory package catalog.
| Distribution | Package | Release | Version | Status |
|---|---|---|---|---|
| Debian | ruby2.7 | 11 | 2.7.4-1 | vulnerable |
| Debian | ruby2.7 | 11 | 2.7.4-1+deb11u1 | fixed |
| Alpine | ruby | 3.12 | 2.7.5-r0 | fixed |
| Alpine | ruby | 3.13 | 2.7.5-r0 | fixed |
| Alpine | ruby | 3.14 | 2.7.5-r0 | fixed |
| Alpine | ruby | 3.15 | 3.0.3-r0 | fixed |
| Alpine | ruby | 3.16 | 3.0.3-r0 | fixed |
| Alpine | ruby | 3.17 | 3.0.3-r0 | fixed |
| Alpine | ruby | 3.18 | 3.0.3-r0 | fixed |
| Alpine | ruby | 3.19 | 3.0.3-r0 | fixed |
| Alpine | ruby | 3.20 | 3.0.3-r0 | fixed |
| Alpine | ruby | 3.21 | 3.0.3-r0 | fixed |
| Alpine | ruby | 3.22 | 3.0.3-r0 | fixed |
| Alpine | ruby | 3.23 | 3.0.3-r0 | fixed |
| Alpine | ruby | 3.24 | 3.0.3-r0 | fixed |
| Ubuntu | ruby2.3 | pro | 2.3.0-1 | vulnerable |
| Ubuntu | ruby2.3 | pro | 2.3.0-2 | vulnerable |
| Ubuntu | ruby2.3 | pro | 2.3.0-4ubuntu2 | vulnerable |
| Ubuntu | ruby2.3 | pro | 2.3.0-4ubuntu3 | vulnerable |
| Ubuntu | ruby2.3 | pro | 2.3.0-5ubuntu1 | vulnerable |
| Ubuntu | ruby2.3 | pro | 2.3.1-2~16.04 | vulnerable |
| Ubuntu | ruby2.3 | pro | 2.3.1-2~16.04.2 | vulnerable |
| Ubuntu | ruby2.3 | pro | 2.3.1-2~16.04.4 | vulnerable |
| Ubuntu | ruby2.3 | pro | 2.3.1-2~16.04.5 | vulnerable |
| Ubuntu | ruby2.3 | pro | 2.3.1-2~16.04.6 | vulnerable |
| Ubuntu | ruby2.3 | pro | 2.3.1-2~16.04.7 | vulnerable |
| Ubuntu | ruby2.3 | pro | 2.3.1-2~16.04.9 | vulnerable |
| Ubuntu | ruby2.3 | pro | 2.3.1-2~16.04.10 | vulnerable |
| Ubuntu | ruby2.3 | pro | 2.3.1-2~16.04.11 | vulnerable |
| Ubuntu | ruby2.3 | pro | 2.3.1-2~16.04.12 | vulnerable |
| Ubuntu | ruby2.3 | pro | 2.3.1-2~ubuntu16.04.13 | vulnerable |
| Ubuntu | ruby2.3 | pro | 2.3.1-2~ubuntu16.04.14 | vulnerable |
| Ubuntu | ruby2.3 | pro | 2.3.1-2~ubuntu16.04.15 | vulnerable |
| Ubuntu | ruby2.3 | pro | 2.3.1-2~ubuntu16.04.16 | vulnerable |
| Ubuntu | ruby2.3 | pro | 2.3.1-2~ubuntu16.04.16+esm1 | vulnerable |
| Ubuntu | ruby2.3 | pro | 2.3.1-2~ubuntu16.04.16+esm2 | fixed |
| Ubuntu | ruby2.5 | 18.04 | 2.5.0~preview1-1ubuntu2 | vulnerable |
| Ubuntu | ruby2.5 | 18.04 | 2.5.0-4ubuntu1 | vulnerable |
| Ubuntu | ruby2.5 | 18.04 | 2.5.0-4ubuntu4 | vulnerable |
| Ubuntu | ruby2.5 | 18.04 | 2.5.0-5ubuntu1 | vulnerable |
| Ubuntu | ruby2.5 | 18.04 | 2.5.0-6ubuntu1 | vulnerable |
| Ubuntu | ruby2.5 | 18.04 | 2.5.1-1ubuntu1 | vulnerable |
| Ubuntu | ruby2.5 | 18.04 | 2.5.1-1ubuntu1.1 | vulnerable |
| Ubuntu | ruby2.5 | 18.04 | 2.5.1-1ubuntu1.2 | vulnerable |
| Ubuntu | ruby2.5 | 18.04 | 2.5.1-1ubuntu1.4 | vulnerable |
| Ubuntu | ruby2.5 | 18.04 | 2.5.1-1ubuntu1.5 | vulnerable |
| Ubuntu | ruby2.5 | 18.04 | 2.5.1-1ubuntu1.6 | vulnerable |
| Ubuntu | ruby2.5 | 18.04 | 2.5.1-1ubuntu1.7 | vulnerable |
| Ubuntu | ruby2.5 | 18.04 | 2.5.1-1ubuntu1.8 | vulnerable |
| Ubuntu | ruby2.5 | 18.04 | 2.5.1-1ubuntu1.9 | vulnerable |
| Ubuntu | ruby2.5 | 18.04 | 2.5.1-1ubuntu1.10 | vulnerable |
| Ubuntu | ruby2.5 | 18.04 | 2.5.1-1ubuntu1.11 | fixed |
| Ubuntu | ruby2.7 | 20.04 | 2.7.0-1 | vulnerable |
| Ubuntu | ruby2.7 | 20.04 | 2.7.0-2 | vulnerable |
| Ubuntu | ruby2.7 | 20.04 | 2.7.0-3 | vulnerable |
| Ubuntu | ruby2.7 | 20.04 | 2.7.0-4 | vulnerable |
| Ubuntu | ruby2.7 | 20.04 | 2.7.0-4ubuntu1 | vulnerable |
| Ubuntu | ruby2.7 | 20.04 | 2.7.0-5ubuntu1 | vulnerable |
| Ubuntu | ruby2.7 | 20.04 | 2.7.0-5ubuntu1.1 | vulnerable |
| Ubuntu | ruby2.7 | 20.04 | 2.7.0-5ubuntu1.2 | vulnerable |
| Ubuntu | ruby2.7 | 20.04 | 2.7.0-5ubuntu1.3 | vulnerable |
| Ubuntu | ruby2.7 | 20.04 | 2.7.0-5ubuntu1.4 | vulnerable |
| Ubuntu | ruby2.7 | 20.04 | 2.7.0-5ubuntu1.5 | vulnerable |
| Ubuntu | ruby2.7 | 20.04 | 2.7.0-5ubuntu1.6 | fixed |
| Ubuntu | ruby2.7 | 20.04 | 2.7.0-1 | vulnerable |
| Ubuntu | ruby2.7 | 20.04 | 2.7.0-2 | vulnerable |
| Ubuntu | ruby2.7 | 20.04 | 2.7.0-3 | vulnerable |
| Ubuntu | ruby2.7 | 20.04 | 2.7.0-4 | vulnerable |
| Ubuntu | ruby2.7 | 20.04 | 2.7.0-4ubuntu1 | vulnerable |
| Ubuntu | ruby2.7 | 20.04 | 2.7.0-5ubuntu1 | vulnerable |
| Ubuntu | ruby2.7 | 20.04 | 2.7.0-5ubuntu1.1 | vulnerable |
| Ubuntu | ruby2.7 | 20.04 | 2.7.0-5ubuntu1.2 | vulnerable |
| Ubuntu | ruby2.7 | 20.04 | 2.7.0-5ubuntu1.3 | vulnerable |
| Ubuntu | ruby2.7 | 20.04 | 2.7.0-5ubuntu1.4 | vulnerable |
| Ubuntu | ruby2.7 | 20.04 | 2.7.0-5ubuntu1.5 | vulnerable |
| Ubuntu | ruby2.7 | 20.04 | 2.7.0-5ubuntu1.6 | fixed |
| Ubuntu | ruby3.0 | 22.04 | 3.0.2-5ubuntu1 | vulnerable |
| Ubuntu | ruby3.0 | 22.04 | 3.0.2-7 | vulnerable |
| Ubuntu | ruby3.0 | 22.04 | 3.0.2-7ubuntu2 | fixed |
| Debian | ruby2.7 | 11 | 2.7.4-1 | vulnerable |
| Debian | ruby2.7 | 11 | 2.7.4-1+deb11u1 | fixed |
| Opensuse | ruby3.0 | tumbleweed | 3.0.3-1.1 | fixed |
| Opensuse | ruby2.7 | tumbleweed | 2.7.5-1.1 | fixed |
Fixed-version evidence
| Distribution | Package | Type | Release | Fixed version | Urgency | Origin | Bugs |
|---|---|---|---|---|---|---|---|
| Debian | ruby2.7 | deb | 11 | 2.7.4-1+deb11u1 | Not reported | DEBIAN-CVE-2021-41816 | Not reported |
| Alpine | ruby | apk | 3.12 | 2.7.5-r0 | Not reported | ALPINE-CVE-2021-41816 | Not reported |
| Alpine | ruby | apk | 3.13 | 2.7.5-r0 | Not reported | ALPINE-CVE-2021-41816 | Not reported |
| Alpine | ruby | apk | 3.14 | 2.7.5-r0 | Not reported | ALPINE-CVE-2021-41816 | Not reported |
| Alpine | ruby | apk | 3.15 | 3.0.3-r0 | Not reported | ALPINE-CVE-2021-41816 | Not reported |
| Alpine | ruby | apk | 3.16 | 3.0.3-r0 | Not reported | ALPINE-CVE-2021-41816 | Not reported |
| Alpine | ruby | apk | 3.17 | 3.0.3-r0 | Not reported | ALPINE-CVE-2021-41816 | Not reported |
| Alpine | ruby | apk | 3.18 | 3.0.3-r0 | Not reported | ALPINE-CVE-2021-41816 | Not reported |
| Alpine | ruby | apk | 3.19 | 3.0.3-r0 | Not reported | ALPINE-CVE-2021-41816 | Not reported |
| Alpine | ruby | apk | 3.20 | 3.0.3-r0 | Not reported | ALPINE-CVE-2021-41816 | Not reported |
| Alpine | ruby | apk | 3.21 | 3.0.3-r0 | Not reported | ALPINE-CVE-2021-41816 | Not reported |
| Alpine | ruby | apk | 3.22 | 3.0.3-r0 | Not reported | ALPINE-CVE-2021-41816 | Not reported |
| Alpine | ruby | apk | 3.23 | 3.0.3-r0 | Not reported | ALPINE-CVE-2021-41816 | Not reported |
| Alpine | ruby | apk | 3.24 | 3.0.3-r0 | Not reported | ALPINE-CVE-2021-41816 | Not reported |
| Ubuntu | ruby2.3 | deb | pro | 2.3.1-2~ubuntu16.04.16+esm2 | Not reported | USN-5235-1 | Not reported |
| Ubuntu | ruby2.5 | deb | 18.04 | 2.5.1-1ubuntu1.11 | Not reported | USN-5235-1 | Not reported |
| Ubuntu | ruby2.7 | deb | 20.04 | 2.7.0-5ubuntu1.6 | Not reported | USN-5235-1 | Not reported |
| Ubuntu | ruby2.7 | deb | 20.04 | 2.7.0-5ubuntu1.6 | Not reported | UBUNTU-CVE-2021-41816 | Not reported |
| Ubuntu | ruby3.0 | deb | 22.04 | 3.0.2-7ubuntu2 | Not reported | UBUNTU-CVE-2021-41816 | Not reported |
| Debian | ruby2.7 | deb | 11 | 2.7.4-1+deb11u1 | Not reported | DSA-5067-1 | Not reported |
| Opensuse | ruby3.0 | rpm | tumbleweed | 3.0.3-1.1 | Not reported | OPENSUSE-SU-2024:11658-1 | Not reported |
| Opensuse | ruby2.7 | rpm | tumbleweed | 2.7.5-1.1 | Not reported | OPENSUSE-SU-2024:11657-1 | Not reported |
OpenFactory catalog packages
No matching packages in this catalog.
Observed:
References
- [https://ftp.suse.com/pub/projects/security/csaf/opensuse-su-2024_11657-1.json]
- [https://osv.dev/vulnerability/ALPINE-CVE-2021-41816]
- [https://osv.dev/vulnerability/DEBIAN-CVE-2021-41816]
- [https://osv.dev/vulnerability/DSA-5067-1]
- [https://osv.dev/vulnerability/UBUNTU-CVE-2021-41816]
- [https://osv.dev/vulnerability/USN-5235-1]
- [https://osv.dev/vulnerability/openSUSE-SU-2024:11657-1]
- [https://osv.dev/vulnerability/openSUSE-SU-2024:11658-1]
- [https://security.access.redhat.com/data/csaf/v2/vex/2021/cve-2021-41816.json]
[FIRST EPSS] · [OSV Package Vulnerability Database] · [Red Hat security advisories and VEX] · [SUSE security advisories and VEX]