CVE-2024-27280
StringIO buffer overread vulnerability
Reported by mitre · Published May 8, 2024
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| ruby-3.1 | Wolfi | 3.1.4-r6 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| n/a | n/a | n/a |
| wolfi | ruby-3.1 | 0 |
| n/a | n/a | * |
| chainguard | ruby-3.0 | 0 |
| RubyGems | stringio | 0 |
| ruby-lang | ruby | 3.0.3 |
| alpine | ruby | 0, 0, 0 |
| chainguard | ruby-3.1 | 0 |
| wolfi | ruby-3.0 | 0 |
Timeline
- Mar 20, 2024 CVE Published
- Oct 4, 2024 Coalition ESS Score (16 in total, the first dated here)
- Feb 14, 2025 EPSS Score (30 in total, the first dated here)
- Mar 17, 2026 Security Advisory (15 in total, the first dated here)
- Oct 11, 2026 CVE Updated
- Nov 16, 2026 Distribution Patch (11 in total, the first dated here)
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2024-27280
vulnetix vdb fixes CVE-2024-27280
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2024-27280/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- https://nvd.nist.gov/vuln/detail/CVE-2024-27280 advisory
- https://github.com/advisories/GHSA-v5h6-c2hv-hv3r advisory
- https://github.com/ruby/stringio/commit/0e596524097706263d10900ca180898e4a8f5233 patch
- https://github.com/ruby/stringio/commit/c58c5f54f1eab99665ea6a161d29ff6a7490afc8 patch
- https://github.com/ruby/stringio url
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/stringio/CVE-2024-27280.yml advisory
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/27LUWREIFTP3MQAW7QE4PJM4DPAQJWXF url
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/XYDHPHEZI7OQXTQKTDZHGZNPIJH7ZV5N url
- https://security.netapp.com/advisory/ntap-20250502-0003 advisory
- https://www.ruby-lang.org/en/news/2024/03/21/buffer-overread-cve-2024-27280 url
- https://security.netapp.com/advisory/ntap-20250502-0003/ url
- http://seclists.org/fulldisclosure/2025/Sep/55 url
- http://seclists.org/fulldisclosure/2025/Sep/54 url
- http://seclists.org/fulldisclosure/2025/Sep/53 url
- https://lists.debian.org/debian-lts-announce/2024/09/msg00000.html url
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/27LUWREIFTP3MQAW7QE4PJM4DPAQJWXF/ url
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/XYDHPHEZI7OQXTQKTDZHGZNPIJH7ZV5N/ url