CVE-2024-27280: Stringio StringIO Buffer Overread Vulnerability Vulnerability
CRITICALCVE-2024-27280 is a CRITICAL (CVSS 9.8) stringio buffer overread vulnerability vulnerability (CWE-120: Buffer Copy without Checking Size of Input ('Classic Buffer Overflow')) affecting Stringio libraries in the RubyGems ecosystem. The issue involves stringio buffer overread vulnerability. Remediation is available by upgrading affected packages to version 3.0.1.1.
CVE-2024-27280 at a Glance
Security Impact
CVSS: 9.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2024-27280
To remediate this vulnerability, upgrade all affected Stringio dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade stringio to 3.0.1.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for stringio
How to Check if You Are Affected
To determine whether your application is affected by CVE-2024-27280, inspect your project dependencies for Stringio:
inspect dependencies for stringio
Analyze the terminal output to locate any version of Stringio in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.0.1.1), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-120: Buffer Copy without Checking Size of Input ('Classic Buffer Overflow'), where the product copies an input buffer to an output buffer without verifying that the size of the input buffer is less than the size of the output buffer. In Stringio, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2024-27280 Affected Stringio Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
stringio
|
RubyGems |
< 3.0.1.1
|
3.0.1.1
|
References
Frequently Asked Questions
What is CVE-2024-27280?
Which Stringio versions are affected?
What version fixes CVE-2024-27280?
Is stringio affected?
What is the CVSS score of CVE-2024-27280?
What CWE is associated with CVE-2024-27280?
How can I check RubyGems dependencies for CVE-2024-27280?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-v5h6-c2hv-hv3r",
"modified" : "2025-11-04T19:46:14Z",
"published" : "2024-03-25T19:36:52Z",
"aliases" : [ "CVE-2024-27280" ],
"summary" : "StringIO buffer overread vulnerability",
"details" : "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.\n\nThe `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.\n\nThis vulnerability is not affected StringIO 3.0.3 and later, and Ruby 3.2.x and later.\n\nWe 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:\n\n* For Ruby 3.0 users: Update to `stringio` 3.0.1.1\n* For Ruby 3.1 users: Update to `stringio` 3.1.0.2\n\nYou can use `gem update stringio` to update it. If you are using bundler, please add `gem \"stringio\", \">= 3.0.1.2\"` to your `Gemfile`.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
}, {
"type" : "CVSS_V4",
"score" : "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"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "RubyGems",
"name" : "stringio"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.0.1.1"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-27280"
}, {
"type" : "WEB",
"url" : "https://github.com/ruby/stringio/commit/0e596524097706263d10900ca180898e4a8f5233"
}, {
"type" : "WEB",
"url" : "https://github.com/ruby/stringio/commit/c58c5f54f1eab99665ea6a161d29ff6a7490afc8"
}, {
"type" : "WEB",
"url" : "https://hackerone.com/reports/1399856"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/ruby/stringio"
}, {
"type" : "WEB",
"url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/stringio/CVE-2024-27280.yml"
}, {
"type" : "WEB",
"url" : "https://lists.debian.org/debian-lts-announce/2024/09/msg00000.html"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/27LUWREIFTP3MQAW7QE4PJM4DPAQJWXF"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/XYDHPHEZI7OQXTQKTDZHGZNPIJH7ZV5N"
}, {
"type" : "WEB",
"url" : "https://security.netapp.com/advisory/ntap-20250502-0003"
}, {
"type" : "WEB",
"url" : "https://www.ruby-lang.org/en/news/2024/03/21/buffer-overread-cve-2024-27280"
}, {
"type" : "WEB",
"url" : "http://seclists.org/fulldisclosure/2025/Sep/53"
}, {
"type" : "WEB",
"url" : "http://seclists.org/fulldisclosure/2025/Sep/54"
}, {
"type" : "WEB",
"url" : "http://seclists.org/fulldisclosure/2025/Sep/55"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-120", "CWE-126" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2024-03-25T19:36:52Z",
"nvd_published_at" : "2024-05-14T15:11:56Z"
}
}