CVE-2024-27280ruby-lang ruby
Critical 9.8 No auth needed
Follow: this CVE · ruby-lang · ruby-lang ruby We alert you by email or Slack (account required).
- Priority
- 74
- CVSS 3.1
- 9.8
- EPSS
- 2.4% probability of exploitation in 30 days · percentile 85
- Auth required
- No
- Published
- May 14, 2024
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-120
- SSVC (CISA)
- Exploitation: none · Automatable: yes · Technical impact: total
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
What happens
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.
What to do
- Apply the vendor's security update for ruby.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| RubyGems | stringio |
< 3.0.1.1 |
3.0.1.1 |
gem "stringio", ">= 3.0.1.1" |
Per OSV / GitHub Advisories (GHSA-v5h6-c2hv-hv3r). Check the version in your lockfile before upgrading.
Affected products
- ruby-lang · ruby
As reported by the CNA that published the CVE. NVD has not added CPEs with versions yet.
Official sources
References
Links published by the sources. Open them with care.