Security Digest · Vulnerability record

CVE-2024-27280: StringIO buffer overread vulnerability

A buffer-overread issue was discovered in StringIO 3.0.1, as distributed in Ruby 3.0.x through 3.0.6 and 3.1.x through 3.1.4.

CVSS 9.3 Critical EPSS 2.4% · p84

Should you act?

Critical and remotely reachable

No known exploitation yet, but it is network-reachable without credentials. This signal is computed from CISA KEV, EPSS and CVSS data; it is not an editorial verdict.

  • No confirmed exploitation. It is not in CISA’s KEV catalog and CISA’s SSVC assessment records no known exploitation. That can change quickly after a public write-up; re-check if you are affected.
  • EPSS 2.4%, percentile 84: FIRST’s model estimates a 2.4% chance of exploitation activity in the next 30 days, higher than 84% of all scored CVEs (elevated). EPSS is a probability, not a verdict.
  • Remotely reachable with no login and no user interaction. If the vulnerable service is exposed to the internet, prioritize it.
  • Only applies if your dependency tree includes stringio (RubyGems) < 3.0.1.1, fixed in 3.0.1.1. Check your lockfile, including transitive dependencies.

What it is

A buffer-overread issue was discovered in StringIO 3.0.1, as distributed in Ruby 3.0.x through 3.0.6 and 3.1.x through 3.1.4. The ungetbyte and ungetc methods on a StringIO can read past the end of a string, and a subsequent call to StringIO.gets may return the memory value. 3.0.3 is the main fixed version; however, for Ruby 3.0 users, a fixed version is stringio 3.0.1.1, and for Ruby 3.1 users, a fixed version is stringio 3.0.1.2.

From the GitHub advisory

An issue was discovered in StringIO 3.0.1, as distributed in Ruby 3.0.x through 3.0.6 and 3.1.x through 3.1.4.

The ungetbyte and ungetc methods on a StringIO can read past the end of a string, and a subsequent call to StringIO.gets may return the memory value.

This vulnerability is not affected StringIO 3.0.3 and later, and Ruby 3.2.x and later.

We recommend to update the StringIO gem to version 3.0.3 or later. In order to ensure compatibility with bundled version in older Ruby series, you may update as follows instead:

For Ruby 3.0 users: Update to stringio 3.0.1.1 For Ruby 3.1 users: Update to stringio 3.1.0.2

Weakness type: CWE-120, CWE-126.

Product: stringio (RubyGems) · Assigned by: mitre · Published: 2024-05-08

Affected and fixed versions

EcosystemPackageVulnerableFirst fixed
RubyGemsstringio< 3.0.1.13.0.1.1
VendorProductAffected versions (per CVE record)
n/an/asee vendor advisory

Severity scores

Scored byCVSSScoreVector
CISA-ADP3.19.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
GitHub4.09.3 CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
  • Attack vector: network (remotely reachable)
  • Attack complexity: low
  • Attack requirements: none
  • Privileges required: none (no login)
  • User interaction: none

CVSS measures how bad a flaw is if exploited, not how likely exploitation is. Read it next to the exploitation data below.

Exploitation and urgency

  • CISA KEV: not listed (no confirmed in-the-wild exploitation known to CISA).
  • CISA SSVC assessment: exploitation none, automatable yes, technical impact total.
  • FIRST EPSS (model of 2026-10-21): 2.36% probability of exploitation activity in the next 30 days; percentile 84.

Timeline

  • — GitHub-reviewed advisory GHSA-v5h6-c2hv-hv3r published (critical)
  • — CVE record published by mitre
  • — CVE record last updated

Sources and references

Original sources first. Version and fix details should always be confirmed against the vendor or project advisory.

Vulnerability records

  1. GitHub Advisory GHSA-v5h6-c2hv-hv3r github.com
  2. CVE.org record CVE-2024-27280 cve.org
  3. NVD entry CVE-2024-27280 nvd.nist.gov

Other references from the CVE record and advisory

  1. hackerone.com hackerone.com
  2. ruby-lang.org ruby-lang.org
  3. security.netapp.com security.netapp.com
  4. seclists.org seclists.org
  5. seclists.org seclists.org
  6. seclists.org seclists.org
  7. lists.debian.org lists.debian.org
  8. lists.fedoraproject.org lists.fedoraproject.org
  9. lists.fedoraproject.org lists.fedoraproject.org
  10. github.com github.com
  11. github.com github.com
  12. github.com github.com

Critical RubyGems advisories · Today’s Security Digest