CVE-2024-27280

ruby: Buffer overread vulnerability in StringIO

Published May 8, 2024 CVSS 3.1 · 9.8 Critical EPSS 2.4% KEV · Not listed
Description
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-3858-1 ruby2.7 security update
Debian DSA Debian DSA DSA-5677-1 ruby3.1 security update
EUVD EUVD EUVD-2024-1008 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.
Github GHSA Github GHSA GHSA-v5h6-c2hv-hv3r StringIO buffer overread vulnerability
Ubuntu USN Ubuntu USN USN-6853-1 Ruby vulnerability
Ubuntu USN Ubuntu USN USN-7734-1 Ruby vulnerabilities
Weaknesses

Sources

Status
PUBLISHED
Assigner
mitre
Published
Updated
Nov 4, 2025, 5:17 PM
Reserved
Feb 22, 2024, 12:00 AM
Status
Deferred
Published
May 14, 2024, 3:11 PM
Modified
Jun 17, 2026, 7:19 AM
Severity
Moderate
Public date
Mar 21, 2024, 12:00 AM