CVE-2021-41816

Source
https://cve.org/CVERecord?id=CVE-2021-41816
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2021-41816.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2021-41816
Aliases
Downstream
Related
Published
2022-02-06T21:15:07.887Z
Modified
2026-03-12T02:29:01.874879Z
Severity
  • 9.8 (Critical) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
Summary
[none]
Details

CGI.escapehtml 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 sizet and long have different numbers of bytes. This also affects the CGI gem before 0.3.1 for Ruby.

References

Affected packages

Git / github.com/ruby/cgi

Affected ranges

Type
GIT
Repo
https://github.com/ruby/cgi
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed
Introduced
0 Unknown introduced commit / All previous commits are affected
Last affected
Introduced
0 Unknown introduced commit / All previous commits are affected
Last affected
Database specific
{
    "versions": [
        {
            "introduced": "0"
        },
        {
            "fixed": "0.3.1"
        },
        {
            "introduced": "0"
        },
        {
            "last_affected": "0.2.0"
        },
        {
            "introduced": "0"
        },
        {
            "last_affected": "0.1.0"
        }
    ]
}

Affected versions

v0.*
v0.1.0
v0.2.0
v0.3.0

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2021-41816.json"
unresolved_ranges
[
    {
        "events": [
            {
                "introduced": "0"
            },
            {
                "last_affected": "34"
            }
        ]
    },
    {
        "events": [
            {
                "introduced": "0"
            },
            {
                "last_affected": "35"
            }
        ]
    }
]