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.
Published: 2022-02-06
Score: 9.8 Critical
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

No analysis available yet.

Remediation

No remediation available yet.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Debian DSA Debian DSA DSA-5067-1 ruby2.7 security update
Github GHSA Github GHSA GHSA-5cqm-crxm-6qpv Buffer overrun in CGI.escape_html
Ubuntu USN Ubuntu USN USN-5235-1 Ruby vulnerabilities
History

Wed, 16 Jul 2025 13:45:00 +0000

Type Values Removed Values Added
Metrics epss

{'score': 0.01232}

epss

{'score': 0.01393}


Subscriptions

Fedoraproject Fedora
Redhat Rhel Software Collections
Ruby-lang Cgi Ruby
cve-icon MITRE

Status: PUBLISHED

Assigner: mitre

Published:

Updated: 2024-08-04T03:22:24.883Z

Reserved: 2021-09-29T00:00:00.000Z

Link: CVE-2021-41816

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Modified

Published: 2022-02-06T21:15:07.887

Modified: 2024-11-21T06:26:48.520

Link: CVE-2021-41816

cve-icon Redhat

Severity : Moderate

Publid Date: 2021-11-24T00:00:00Z

Links: CVE-2021-41816 - Bugzilla

cve-icon OpenCVE Enrichment

No data.

Weaknesses