Skip to content
Fencer Vulns
critical 9.8

CVE-2024-27280 json

StringIO buffer overread vulnerability

published 2024-03-25 2 y ago modified 2026-09-10 1 mo ago also EUVD-2024-1008 , GHSA-v5h6-c2hv-hv3r

cvss
9.8
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
2.4%
EPSS 2.4% chance of exploitation in 30 days, percentile 83%
public exploits
0
none known

Summary

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.

Patch / fix

  • rubygems stringio 3.0.1.1
  • ruby-lang stringio 3.0.1.1, 3.0.3
  • ruby3.1 Debian 12 3.1.2-7+deb12u1

debian advisories DEBIAN-CVE-2024-27280

  • ruby2.7 Ubuntu 20.04 LTS 2.7.0-5ubuntu1.14
  • ruby3.0 Ubuntu 22.04 LTS 3.0.2-7ubuntu2.7
  • ruby2.5 Ubuntu Pro 18.04 LTS 2.5.1-1ubuntu1.16+esm5

ubuntu advisories UBUNTU-CVE-2024-27280

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • ruby RHEL 8 2.5.9-112.module+el8.10.0+22021+135c76a8
  • ruby-irb RHEL 8 2.5.9-112.module+el8.10.0+22021+135c76a8
  • rubygems RHEL 8 2.7.6.3-112.module+el8.10.0+22021+135c76a8
  • ruby-libs RHEL 8 2.5.9-112.module+el8.10.0+22021+135c76a8
  • rubygem-pg RHEL 8 1.0.0-3.module+el8.9.0+19193+435404ae
  • rubygem-abrt RHEL 8 0.3.0-4.module+el8.10.0+22021+135c76a8
  • rubygem-bson RHEL 8 4.3.0-2.module+el8.9.0+19193+435404ae
  • rubygem-json RHEL 8 2.1.0-112.module+el8.10.0+22021+135c76a8

red hat advisories RHSA-2024:4499RHSA-2024:3838RHSA-2024:3671RHSA-2024:3670RHSA-2024:3668RHSA-2024:3546

  • ruby AlmaLinux 8 2.5.9-112.module_el8.10.0+3871+342e2c2f
  • ruby-irb AlmaLinux 8 2.5.9-112.module_el8.10.0+3871+342e2c2f
  • rubygems AlmaLinux 8 2.7.6.3-112.module_el8.10.0+3871+342e2c2f
  • ruby-libs AlmaLinux 8 2.5.9-112.module_el8.10.0+3871+342e2c2f
  • rubygem-pg AlmaLinux 8 1.0.0-3.module_el8.9.0+3635+c6f99506
  • rubygem-abrt AlmaLinux 8 0.3.0-4.module_el8.10.0+3871+342e2c2f
  • rubygem-bson AlmaLinux 8 4.3.0-2.module_el8.5.0+2625+ec418553
  • rubygem-bson AlmaLinux 8 4.3.0-2.module_el8.6.0+3170+4b08f9d4

almalinux advisories ALSA-2024:4499ALSA-2024:3838ALSA-2024:3668ALSA-2024:3670ALSA-2024:3671ALSA-2024:3546

  • ruby Rocky Linux 8 2.5.9-112.module+el8.10.0+1839+f1f156ae
  • rubygem-pg Rocky Linux 8 1.0.0-3.module+el8.9.0+1536+5f79634e
  • rubygem-abrt Rocky Linux 8 0.3.0-4.module+el8.5.0+738+032c9c02
  • rubygem-bson Rocky Linux 8 4.3.0-2.module+el8.9.0+1536+5f79634e
  • rubygem-mongo Rocky Linux 8 2.5.1-2.module+el8.9.0+1536+5f79634e
  • rubygem-mysql2 Rocky Linux 8 0.4.10-4.module+el8.9.0+1536+5f79634e
  • rubygem-bundler Rocky Linux 8 1.16.1-4.module+el8.9.0+1536+5f79634e
  • rubygem-pg Rocky Linux 9 1.3.5-1.module+el9.6.0+31865+0893c253

rocky linux advisories RLSA-2024:4499RLSA-2024:3668RLSA-2024:3671RLSA-2024:3546RLSA-2024:3670

  • ruby Alpine 3.17, Alpine 3.16 3.1.5-r0
  • ruby Alpine 3.19, Alpine 3.18 3.2.4-r0
  • ruby Alpine 3.24, Alpine 3.23, Alpine 3.22 +2 more 3.3.1-r0

alpine advisories ALPINE-CVE-2024-27280

Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2024-27280 updated cvss 3.1

ruby: Buffer overread vulnerability in StringIO

  • Red Hat Enterprise Linux 6 ruby, ruby-ri, ruby-irb, ruby-libs, ruby-rdoc, ruby-tcltk Red Hat Enterprise Linux 7 ruby, ruby-irb, rubygems, ruby-libs, ruby-tcltk, rubygem-json, +6 more Red Hat Storage 3 ruby, ruby-irb, rubygems, ruby-libs, rubygem-json, rubygem-rake, +11 more
    affected: workaround, no fix planned “Out of support scope”
  • Red Hat Enterprise Linux AppStream (v. 8) ruby 3.3.1-2.module+el8.10.0+21860+47fbda2a, ruby 2.5.9-112.module+el8.10.0+22021+135c76a8, ruby 3.0.7-143.module+el8.10.0+21858+d19f3934, ruby 3.1.5-143.module+el8.10.0+21792+e2f63d26, rubygems 3.5.9-2.module+el8.10.0+21860+47fbda2a, ruby-libs 3.3.1-2.module+el8.10.0+21860+47fbda2a, +86 more
    fixed: vendor fix RHSA-2024:4499
  • Red Hat Enterprise Linux AppStream (v. 9) ruby 3.0.7-162.el9_4, ruby-libs 3.0.7-162.el9_4, rubygems 3.2.33-162.el9_4, rubygem-irb 1.3.5-162.el9_4, rubygem-rbs 1.4.0-162.el9_4, rubygem-rss 0.2.9-162.el9_4, +58 more Red Hat Enterprise Linux CRB (v. 9) ruby-doc 3.0.7-162.el9_4
    fixed: vendor fix RHSA-2024:3838
  • Red Hat Enterprise Linux 10 ruby Red Hat OpenStack Platform 16.2 puppet-memcached Red Hat OpenStack Platform 17.1 puppet-memcached Red Hat Satellite 6 satellite-installer
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

CISA SSVC

Exploitation
none
Automatable
yes
Technical impact
total
Assessed
2 y ago

Exploit prediction

2.36% chance of exploitation in the next 30 days, higher than 83% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
CISA ADP 3.1 9.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
GitHub 3.1 9.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CNA 3.1 9.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Affected packages

ecosystem package affected fixed in
rubygems stringio
<3.0.1.1
3.0.1.1

Affected products

  • ruby-lang ruby

Classification

Weakness
  • CWE-120 Buffer Copy without Checking Size of Input
  • CWE-126 Buffer Over-read

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.

CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.