🛡️ CVE-2021-41816 — cgi
Description
Buffer overrun in CGI.escape_html
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.
How this vulnerability can be exploited
This issue can be reached over the network, attack complexity is low, an attacker needs no privileges on the target. No user interaction is required. The scope is unchanged, so the impact stays within the vulnerable component. Rated impact: confidentiality high, integrity high, availability high.
Weakness class
CVE-2021-41816 is classified as CWE-190: Integer Overflow or Wraparound. Arithmetic produces a value too large for its type and wraps around, so a later size or bounds check passes when it should not.
Affected software
CVE-2021-41816 is recorded against 1 package.
- cgi (fixed in 0.1.0.1)
Timeline and source
Published on 14 December 2021 and last revised on 4 February 2026. No public exploit is currently recorded for this entry. Record sourced from OSV.
References
nvd.nist.gov (Advisory)
github.com (Web)
github.com (Web)
github.com (Web)
github.com (Web)
hackerone.com (Web)
www.ruby-lang.org (Web)
security.netapp.com (Web)
security.gentoo.org (Web)
security-tracker.debian.org (Web)
lists.fedoraproject.org (Web)
lists.fedoraproject.org (Web)
lists.fedoraproject.org (Web)
lists.fedoraproject.org (Web)
groups.google.com (Web)
CVE-2021-41816 on other distributions
Each distribution ships its own build and its own fixed version. Pick the one you run:
Details
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Affected Packages
| Software | From version | Fixed in |
|---|---|---|
| cgi | — | 0.1.0.1 |
References
Similar Threats
- Unknown DEBIAN-CVE-2026-4985
- Unknown UBUNTU-CVE-2026-4985
- Medium CVE-2025-27219
- Medium CVE-2025-27220
- Unknown openSUSE-SU-2024:10679-1
More CVE 2021 advisories
Browse all of CVE 2021 in the advisory index.
Exploit Protection
Are you running cgi?
CVE-2021-41816 carries CVSS 9.5 Critical rating. BotEraser checks your installation against this and other known CVE records, and blocks IPs associated with exploit activity.
Check My Site For CVE-2021-41816 →No credit card required · Results in minutes
ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.