Security mailing lists by PureSourceCode

CVE-2021-41816

CRITICAL 9.8CVSS 3.1

Buffer overrun in CGI.escape_html

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
6 Feb 2022
Last modified
13 Aug 2026
Assigned by
cve@mitre.org
NVD status
Modified
Weakness
CWE-190
Also known as
GHSA-5cqm-crxm-6qpv
Sources
NVDJSONOSV GHSA-5cqm-crxm-6qpvJSON

Scores

SourceScored byVersionScoreVector / decision
NVD nvd@nist.gov (Primary) CVSS 3.1 CRITICAL 9.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
OSV GitHub CVSS 3.1 CRITICAL 9.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD nvd@nist.gov (Primary) CVSS 2.0 HIGH 7.5 AV:N/AC:L/Au:N/C:P/I:P/A:P

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
NVD ruby-lang cgi
cpe:2.3:a:ruby-lang:cgi:*:*:*:*:*:ruby:*:*
< 0.3.1 0.3.1
NVD ruby-lang cgi
cpe:2.3:a:ruby-lang:cgi:*:*:*:*:*:ruby:*:*
<= 0.2.0
NVD ruby-lang cgi
cpe:2.3:a:ruby-lang:cgi:*:*:*:*:*:ruby:*:*
<= 0.1.0
NVD fedoraproject fedora
cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:*
= 34
NVD fedoraproject fedora
cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:*
= 35
OSV RubyGems cgi >= 0.3.0, < 0.3.1 0.3.1
OSV RubyGems cgi >= 0.2.0, < 0.2.1 0.2.1
OSV RubyGems cgi < 0.1.0.1 0.1.0.1

References

History

  • 25 Nov 2026 20:34 UTC · NVD: first stored (published 6 Feb 2022)
  • 25 Nov 2026 20:14 UTC · OSV: first stored (published 14 Dec 2021)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.