CVE-2021-41816

medium
Published 2021-11-24 ยท Modified 2026-02-04
CVSS v3
โ€”
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS v4 NEW
โ€”
not yet in upstream
VIR risk
5.5

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.

Predictions

Exploit likelihood
30%
Patch ETA
โ€”

Heuristic predictions, AS-IS, for prioritization only.

Mitigations

No mitigations published for this CVE yet.

The vendor-content worker queues fetches as references arrive (check back in a few minutes). Or โ€” if you've already worked around this in production โ€” publish your fix to the community-verified tier.

โœš Propose a mitigation on Community โ†’ Mitigations published via the community go through AI scoring + 2 human reviewers + 7-day silent objection window before landing here with source_tier=community-verified.

OS impact

OSVersionStatusFixed in
arch archaffected
debian debianbullseyefixed2.7.4-1+deb11u1

Package impact

EcosystemPackageVulnerableFixed
ruby RubyGemscgi<~> 0.1.0.1~> 0.1.0.1
ruby RubyGemscgi>=0.3.0,<0.3.10.3.1
ruby RubyGemscgi>=0.2.0,<0.2.10.2.1
ruby RubyGemscgi<0.1.0.10.1.0.1

References

Community-verified mitigations for this CVE will appear above when contributors publish them.

Verify integrity in audit chain (admin only). AS-IS.