All reports
Critical

Buffer overrun in CGI.escape_html

Affected versions

RubyGemscgi
Affected versions
>= 0.2.0, < 0.2.1
Fixed version
0.2.1
RubyGemscgi
Affected versions
< 0.1.0.1
Fixed version
0.1.0.1
RubyGemscgi
Affected versions
>= 0.3.0, < 0.3.1
Fixed version
0.3.1

Exploitation

CVE-2021-41816

Probability of exploitation in the next 30 days: 4.90%

FIRST EPSS · 2026-11-20

Description

A buffer overrun vulnerability was discovered in CGI.escape_html. This can lead to a buffer overflow when a user passes a very large string (> 700 MB) to CGI.escape_html on a platform where long type takes 4 bytes, typically, Windows.

Links

Credits

  • kir-b