---
title: "CVE-2021-41816"
canonical_url: "https://pkgseek.com/security/CVE-2021-41816"
locale: "en"
source: "pkgseek"
entity_type: "cve"
severity: "critical"
---

# 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 numbers of bytes. This also affects the CGI gem before 0.3.1 for Ruby.

CVE-2021-41816 is rated CRITICAL (9.8), with 4 indexed affected package builds across 1 distributions.

- **Severity / Score**: CRITICAL (9.8)
- **Affected builds**: 4
- **Affected distros**: 1
- **Distros with fixed_in**: Ubuntu

## Affected Packages

| Distribution | Release | Package | Version | Fixed In |
| --- | --- | --- | --- | --- |
| Ubuntu | focal | libruby2.7 | 2.7.0-5ubuntu1 | 2.7.0-5ubuntu1.6 |
| Ubuntu | focal | ruby2.7 | 2.7.0-5ubuntu1 | 2.7.0-5ubuntu1.6 |
| Ubuntu | focal | ruby2.7-dev | 2.7.0-5ubuntu1 | 2.7.0-5ubuntu1.6 |
| Ubuntu | focal | ruby2.7-doc | 2.7.0-5ubuntu1 | 2.7.0-5ubuntu1.6 |
