Advisory record · GHSA-5cqm-crxm-6qpv

Buffer overrun in CGI.escape_html

CVSS 9.8 CriticalCriticalEPSS 0.049 · 92nd percentile

Critical, because:

  • CVSS score 9.8: 9.0 or more.

How we decide what’s critical

Published by the GitHub Advisory Database at 14 Dec 2021, 21:36 UTC. agentprime has not analysed this yet, so whether it affects any app is not known.

PackageEcosystemAffectedFixed in
cgiRubyGems>=0.3.0, <0.3.1 || >=0.2.0, <0.2.1 || <0.1.0.10.3.1, 0.2.1, 0.1.0.1
Identifiers
GHSA-5cqm-crxm-6qpv · CVE-2021-41816
Weakness (CWE)
CWE-190
Published
14 Dec 2021
Updated
13 Aug 2026

Machine-written summary

Summary written by Claude Haiku from the source advisory. Not reviewed by a person.

The cgi gem for Ruby is vulnerable in versions before 0.1.0.1, from 0.2.0 before 0.2.1, and from 0.3.0 before 0.3.1. An attacker who can get an application to pass a very large string (over 700 MB) to CGI.escape_html on a platform where the long type is 4 bytes, typically Windows, can trigger a buffer overflow. Upgrade to cgi 0.1.0.1, 0.2.1, or 0.3.1, depending on the version you use.

Written 8 Nov 2026.

Not analysed yet

We haven’t published our analysis of this Advisory yet. Once a person has reviewed it, this page will say what’s vulnerable, what has to be true for your app to be affected, and how to check.

Severity and exploitation

ScoreRatingCVSSVectorSource
9.8 Critical 3.1 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H GitHub Advisory Database
  • CISA KEV Not listed.
  • EPSS 0.049, the 92nd percentile, on 9 Nov 2026: FIRST’s estimate of the chance of exploitation in the next 30 days.

Timeline

  1. 31 Oct 2026, 15:16 UTC First seen by agentprime
  2. 31 Oct 2026, 15:16 UTC Confirmed by OSV

Sources

Facts on this page come from the GitHub Advisory Database (CC-BY 4.0), OSV and the other sources listed, as published. We don’t reproduce full advisory descriptions, which can contain exploit code.