{"schema":"/api/v1/schema/cve.json","api_version":"1","id":"CVE-2021-41816","published":"2022-02-06T21:15:07.887000Z","last_modified":"2026-06-17T04:08:57.320000Z","status":"Modified","cvss":{"version":"3.1","score":9.8,"severity":"CRITICAL","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","source":"nvd@nist.gov","primary":true},"auth":false,"cwes":["CWE-190"],"cpes":[{"criteria":"cpe:2.3:a:ruby-lang:cgi:*:*:*:*:*:ruby:*:*","part":"a","vendor":"ruby-lang","product":"cgi","version_end_excluding":"0.3.1"},{"criteria":"cpe:2.3:a:ruby-lang:cgi:*:*:*:*:*:ruby:*:*","part":"a","vendor":"ruby-lang","product":"cgi","version_end_including":"0.2.0"},{"criteria":"cpe:2.3:a:ruby-lang:cgi:*:*:*:*:*:ruby:*:*","part":"a","vendor":"ruby-lang","product":"cgi","version_end_including":"0.1.0"},{"criteria":"cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:*","part":"o","vendor":"fedoraproject","product":"fedora","version":"34"},{"criteria":"cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:*","part":"o","vendor":"fedoraproject","product":"fedora","version":"35"}],"cpes_truncated":false,"vendors":["ruby-lang","fedoraproject"],"products":["ruby-lang/cgi","fedoraproject/fedora"],"epss":{"score":0.04898,"percentile":0.92877,"date":"2026-11-29","model_version":"v2026.06.15"},"cat":"app","platform":"multi","eol":false,"packages":[{"advisory":"GHSA-5cqm-crxm-6qpv","ecosystem":"RubyGems","name":"cgi","purl":"pkg:gem/cgi","ranges":[{"introduced":"0.3.0","fixed":"0.3.1"}],"versions":["0.3.0"],"versions_truncated":false},{"advisory":"GHSA-5cqm-crxm-6qpv","ecosystem":"RubyGems","name":"cgi","purl":"pkg:gem/cgi","ranges":[{"introduced":"0.2.0","fixed":"0.2.1"}],"versions":["0.2.0"],"versions_truncated":false},{"advisory":"GHSA-5cqm-crxm-6qpv","ecosystem":"RubyGems","name":"cgi","purl":"pkg:gem/cgi","ranges":[{"introduced":"0","fixed":"0.1.0.1"}],"versions":["0.1.0"],"versions_truncated":false}],"severity":"critical","priority_score":74,"links":{"html_es":"/es/cve/CVE-2021-41816/","html_en":"/en/cve/CVE-2021-41816/","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2021-41816","cve_org":"https://www.cve.org/CVERecord?id=CVE-2021-41816"},"untrusted":{"vendor_name":"Ruby-lang","product_name":"Cgi","desc_en":"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.","affected":[],"references":[{"url":"https://hackerone.com/reports/1328463","tags":["Permissions Required","Third Party Advisory"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/IUXQCH6FRKANCVZO2Q7D2SQX33FP3KWN/","tags":[]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/UTOJGS5IEFDK3UOO7IY4OTTFGHGLSWZF/","tags":[]},{"url":"https://security-tracker.debian.org/tracker/CVE-2021-41816","tags":["Third Party Advisory"]},{"url":"https://security.gentoo.org/glsa/202401-27","tags":[]},{"url":"https://security.netapp.com/advisory/ntap-20220303-0006/","tags":["Third Party Advisory"]},{"url":"https://www.ruby-lang.org/en/news/2021/11/24/buffer-overrun-in-cgi-escape_html-cve-2021-41816/","tags":["Exploit","Vendor Advisory"]}]},"bulletins":[{"source":"suse","id":"openSUSE-SU-2025:15819-1","url":"https://www.suse.com/support/update/","published":"2025-12-12T00:00:00+00:00","severity":"critical","exploited":false,"untrusted":{"title":"libruby4_0-4_0-4.0.0~preview2-1.1 on GA media"}}]}