CVE-2026-27820: CWE-120: Buffer Copy without Checking Size of Input ('Classic Buffer Overflow') in ruby zlib
A buffer overflow vulnerability exists in the Ruby zlib library's Zlib::GzipReader component in certain versions prior to 3. 0. 1, 3. 1. 2, and 3. 2. 3. The issue arises because the zstream_buffer_ungets function does not ensure the backing Ruby string has sufficient capacity before shifting data, leading to potential memory corruption. This vulnerability has a low CVSS score of 1. 7 and no known exploits in the wild.
AI Analysis
Technical Summary
The Ruby zlib library versions 3.0.0 and below, 3.1.0, 3.1.1, 3.2.0, and 3.2.1 contain a classic buffer overflow vulnerability (CWE-120) in the Zlib::GzipReader. Specifically, the zstream_buffer_ungets function prepends bytes to previously produced output without verifying that the backing Ruby string has enough capacity before performing a memmove operation. This can cause memory corruption when the buffer length exceeds its capacity. The vulnerability is addressed in versions 3.0.1, 3.1.2, and 3.2.3.
Potential Impact
Successful exploitation could lead to memory corruption, which may cause application crashes or undefined behavior. The CVSS score of 1.7 indicates a low severity impact, and there are no known exploits in the wild at this time.
Mitigation Recommendations
Upgrade Ruby zlib to version 3.0.1, 3.1.2, or 3.2.3 or later, where this buffer overflow vulnerability has been fixed. Patch status is confirmed by the version fixes listed in the advisory. No additional mitigation is indicated.
CVE-2026-27820: CWE-120: Buffer Copy without Checking Size of Input ('Classic Buffer Overflow') in ruby zlib
Description
A buffer overflow vulnerability exists in the Ruby zlib library's Zlib::GzipReader component in certain versions prior to 3. 0. 1, 3. 1. 2, and 3. 2. 3. The issue arises because the zstream_buffer_ungets function does not ensure the backing Ruby string has sufficient capacity before shifting data, leading to potential memory corruption. This vulnerability has a low CVSS score of 1. 7 and no known exploits in the wild.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The Ruby zlib library versions 3.0.0 and below, 3.1.0, 3.1.1, 3.2.0, and 3.2.1 contain a classic buffer overflow vulnerability (CWE-120) in the Zlib::GzipReader. Specifically, the zstream_buffer_ungets function prepends bytes to previously produced output without verifying that the backing Ruby string has enough capacity before performing a memmove operation. This can cause memory corruption when the buffer length exceeds its capacity. The vulnerability is addressed in versions 3.0.1, 3.1.2, and 3.2.3.
Potential Impact
Successful exploitation could lead to memory corruption, which may cause application crashes or undefined behavior. The CVSS score of 1.7 indicates a low severity impact, and there are no known exploits in the wild at this time.
Mitigation Recommendations
Upgrade Ruby zlib to version 3.0.1, 3.1.2, or 3.2.3 or later, where this buffer overflow vulnerability has been fixed. Patch status is confirmed by the version fixes listed in the advisory. No additional mitigation is indicated.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-02-24T02:32:39.799Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 69e1241082d89c981fafb513
Added to database: 4/16/2026, 6:01:52 PM
Last enriched: 4/16/2026, 6:16:59 PM
Last updated: 4/16/2026, 8:30:21 PM
Views: 7
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.