{"api_version":"1","generated_at":"2026-04-22T21:27:33+00:00","cve":"CVE-2021-41816","urls":{"html":"https://cve.report/CVE-2021-41816","api":"https://cve.report/api/cve/CVE-2021-41816.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2021-41816","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2021-41816"},"summary":{"title":"CVE-2021-41816","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.","state":"PUBLIC","assigner":"cve@mitre.org","published_at":"2022-02-06 21:15:00","updated_at":"2024-01-24 05:15:00"},"problem_types":["CWE-190"],"metrics":[],"references":[{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/UTOJGS5IEFDK3UOO7IY4OTTFGHGLSWZF/","name":"FEDORA-2022-8cf0124add","refsource":"","tags":[],"title":"[SECURITY] Fedora 35 Update: ruby-3.0.4-153.fc35 - package-announce - Fedora Mailing-Lists","mime":"text/html","httpstatus":"200","archivestatus":"200"},{"url":"https://security.netapp.com/advisory/ntap-20220303-0006/","name":"https://security.netapp.com/advisory/ntap-20220303-0006/","refsource":"CONFIRM","tags":[],"title":"CVE-2021-41816 Ruby Vulnerability in NetApp Products | NetApp Product Security","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/UTOJGS5IEFDK3UOO7IY4OTTFGHGLSWZF/","name":"FEDORA-2022-8cf0124add","refsource":"FEDORA","tags":[],"title":"[SECURITY] Fedora 35 Update: ruby-3.0.4-153.fc35 - package-announce - Fedora Mailing-Lists","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/IUXQCH6FRKANCVZO2Q7D2SQX33FP3KWN/","name":"FEDORA-2022-82a9edac27","refsource":"","tags":[],"title":"[SECURITY] Fedora 34 Update: ruby-3.0.4-153.fc34 - package-announce - Fedora Mailing-Lists","mime":"text/html","httpstatus":"200","archivestatus":"200"},{"url":"https://security.gentoo.org/glsa/202401-27","name":"GLSA-202401-27","refsource":"","tags":[],"title":"Ruby: Multiple vulnerabilities (GLSA 202401-27) — Gentoo security","mime":"text/html","httpstatus":"200","archivestatus":"200"},{"url":"https://www.ruby-lang.org/en/news/2021/11/24/buffer-overrun-in-cgi-escape_html-cve-2021-41816/","name":"https://www.ruby-lang.org/en/news/2021/11/24/buffer-overrun-in-cgi-escape_html-cve-2021-41816/","refsource":"CONFIRM","tags":[],"title":"CVE-2021-41816: Buffer Overrun in CGI.escape_html","mime":"text/html","httpstatus":"200","archivestatus":"200"},{"url":"https://security-tracker.debian.org/tracker/CVE-2021-41816","name":"https://security-tracker.debian.org/tracker/CVE-2021-41816","refsource":"MISC","tags":[],"title":"CVE-2021-41816","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://hackerone.com/reports/1328463","name":"https://hackerone.com/reports/1328463","refsource":"MISC","tags":[],"title":"HackerOne","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/IUXQCH6FRKANCVZO2Q7D2SQX33FP3KWN/","name":"FEDORA-2022-82a9edac27","refsource":"FEDORA","tags":[],"title":"[SECURITY] Fedora 34 Update: ruby-3.0.4-153.fc34 - package-announce - Fedora Mailing-Lists","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://www.cve.org/CVERecord?id=CVE-2021-41816","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-41816","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[{"cve_year":"2021","cve_id":"41816","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"o","cpe4":"fedoraproject","cpe5":"fedora","cpe6":"34","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"},{"cve_year":"2021","cve_id":"41816","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"o","cpe4":"fedoraproject","cpe5":"fedora","cpe6":"35","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"},{"cve_year":"2021","cve_id":"41816","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"a","cpe4":"ruby-lang","cpe5":"cgi","cpe6":"*","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"ruby","cpe12":"*","cpe13":"*"},{"cve_year":"2021","cve_id":"41816","vulnerable":"1","versionEndIncluding":"0.1.0","cpe1":"cpe","cpe2":"2.3","cpe3":"a","cpe4":"ruby-lang","cpe5":"cgi","cpe6":"*","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"ruby","cpe12":"*","cpe13":"*"},{"cve_year":"2021","cve_id":"41816","vulnerable":"1","versionEndIncluding":"0.2.0","cpe1":"cpe","cpe2":"2.3","cpe3":"a","cpe4":"ruby-lang","cpe5":"cgi","cpe6":"*","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"ruby","cpe12":"*","cpe13":"*"},{"cve_year":"2021","cve_id":"41816","vulnerable":"-1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"a","cpe4":"ruby-lang","cpe5":"ruby","cpe6":"*","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"}],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[{"cve":"CVE-2021-41816","qid":"179050","title":"Debian Security Update for ruby2.7 (DSA 5067-1)"},{"cve":"CVE-2021-41816","qid":"198635","title":"Ubuntu Security Notification for Ruby Vulnerabilities (USN-5235-1)"},{"cve":"CVE-2021-41816","qid":"240720","title":"Red Hat Update for rh-ruby27-ruby security (RHSA-2022:6856)"},{"cve":"CVE-2021-41816","qid":"240723","title":"Red Hat Update for rh-ruby30-ruby security (RHSA-2022:6855)"},{"cve":"CVE-2021-41816","qid":"282660","title":"Fedora Security Update for ruby (FEDORA-2022-82a9edac27)"},{"cve":"CVE-2021-41816","qid":"282661","title":"Fedora Security Update for ruby (FEDORA-2022-8cf0124add)"},{"cve":"CVE-2021-41816","qid":"356181","title":"Amazon Linux Security Advisory for ruby : ALASRUBY3.0-2023-003"},{"cve":"CVE-2021-41816","qid":"356463","title":"Amazon Linux Security Advisory for ruby : ALAS2RUBY3.0-2023-003"},{"cve":"CVE-2021-41816","qid":"500617","title":"Alpine Linux Security Update for ruby"},{"cve":"CVE-2021-41816","qid":"502024","title":"Alpine Linux Security Update for ruby"},{"cve":"CVE-2021-41816","qid":"504377","title":"Alpine Linux Security Update for ruby"},{"cve":"CVE-2021-41816","qid":"690621","title":"Free Berkeley Software Distribution (FreeBSD) Security Update for rubygem-cgi (2c6af5c3-4d36-11ec-a539-0800270512f4)"},{"cve":"CVE-2021-41816","qid":"710844","title":"Gentoo Linux Ruby Multiple Vulnerabilities (GLSA 202401-27)"},{"cve":"CVE-2021-41816","qid":"904903","title":"Common Base Linux Mariner (CBL-Mariner) Security Update for ruby (12423)"}]},"source_records":{"cve_program":{"CVE_data_meta":{"ASSIGNER":"cve@mitre.org","ID":"CVE-2021-41816","STATE":"PUBLIC"},"affects":{"vendor":{"vendor_data":[{"product":{"product_data":[{"product_name":"n/a","version":{"version_data":[{"version_value":"n/a"}]}}]},"vendor_name":"n/a"}]}},"data_format":"MITRE","data_type":"CVE","data_version":"4.0","description":{"description_data":[{"lang":"eng","value":"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."}]},"problemtype":{"problemtype_data":[{"description":[{"lang":"eng","value":"n/a"}]}]},"references":{"reference_data":[{"url":"https://hackerone.com/reports/1328463","refsource":"MISC","name":"https://hackerone.com/reports/1328463"},{"refsource":"CONFIRM","name":"https://www.ruby-lang.org/en/news/2021/11/24/buffer-overrun-in-cgi-escape_html-cve-2021-41816/","url":"https://www.ruby-lang.org/en/news/2021/11/24/buffer-overrun-in-cgi-escape_html-cve-2021-41816/"},{"refsource":"MISC","name":"https://security-tracker.debian.org/tracker/CVE-2021-41816","url":"https://security-tracker.debian.org/tracker/CVE-2021-41816"},{"refsource":"CONFIRM","name":"https://security.netapp.com/advisory/ntap-20220303-0006/","url":"https://security.netapp.com/advisory/ntap-20220303-0006/"},{"refsource":"FEDORA","name":"FEDORA-2022-82a9edac27","url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/IUXQCH6FRKANCVZO2Q7D2SQX33FP3KWN/"},{"refsource":"FEDORA","name":"FEDORA-2022-8cf0124add","url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/UTOJGS5IEFDK3UOO7IY4OTTFGHGLSWZF/"}]}},"nvd":{"publishedDate":"2022-02-06 21:15:00","lastModifiedDate":"2024-01-24 05:15:00","problem_types":["CWE-190"],"metrics":{"baseMetricV3":{"cvssV3":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH","baseScore":9.8,"baseSeverity":"CRITICAL"},"exploitabilityScore":3.9,"impactScore":5.9},"baseMetricV2":{"cvssV2":{"version":"2.0","vectorString":"AV:N/AC:L/Au:N/C:P/I:P/A:P","accessVector":"NETWORK","accessComplexity":"LOW","authentication":"NONE","confidentialityImpact":"PARTIAL","integrityImpact":"PARTIAL","availabilityImpact":"PARTIAL","baseScore":7.5},"severity":"HIGH","exploitabilityScore":10,"impactScore":6.4,"acInsufInfo":false,"obtainAllPrivilege":false,"obtainUserPrivilege":false,"obtainOtherPrivilege":false,"userInteractionRequired":false}},"configurations":{"CVE_data_version":"4.0","nodes":[{"operator":"OR","children":[],"cpe_match":[{"vulnerable":true,"cpe23Uri":"cpe:2.3:a:ruby-lang:cgi:*:*:*:*:*:ruby:*:*","versionEndExcluding":"0.3.1","cpe_name":[]}]},{"operator":"AND","children":[{"operator":"OR","children":[],"cpe_match":[{"vulnerable":true,"cpe23Uri":"cpe:2.3:a:ruby-lang:cgi:*:*:*:*:*:ruby:*:*","versionEndIncluding":"0.2.0","cpe_name":[]}]},{"operator":"OR","children":[],"cpe_match":[{"vulnerable":false,"cpe23Uri":"cpe:2.3:a:ruby-lang:ruby:*:*:*:*:*:*:*:*","versionStartIncluding":"3.0.0","versionEndExcluding":"3.0.3","cpe_name":[]}]}],"cpe_match":[]},{"operator":"AND","children":[{"operator":"OR","children":[],"cpe_match":[{"vulnerable":true,"cpe23Uri":"cpe:2.3:a:ruby-lang:cgi:*:*:*:*:*:ruby:*:*","versionEndIncluding":"0.1.0","cpe_name":[]}]},{"operator":"OR","children":[],"cpe_match":[{"vulnerable":false,"cpe23Uri":"cpe:2.3:a:ruby-lang:ruby:*:*:*:*:*:*:*:*","versionStartIncluding":"2.7.0","versionEndExcluding":"2.7.5","cpe_name":[]}]}],"cpe_match":[]},{"operator":"OR","children":[],"cpe_match":[{"vulnerable":true,"cpe23Uri":"cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:*","cpe_name":[]},{"vulnerable":true,"cpe23Uri":"cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:*","cpe_name":[]}]}]}},"legacy_mitre":{"record":{"CveYear":"2021","CveId":"41816","Ordinal":"217631","Title":"CVE-2021-41816","CVE":"CVE-2021-41816","Year":"2021"},"notes":[{"CveYear":"2021","CveId":"41816","Ordinal":"1","NoteData":"** RESERVED ** This candidate has been reserved by an organization or individual that will use it when announcing a new security problem. When the candidate has been publicized, the details for this candidate will be provided.","Type":"Description","Title":null}]}}}