CVE-2026-27820: zlib Ruby - Buffer Overflow
- Cve: CVE-2026-27820
- Name: zlib Ruby - Buffer Overflow
- Description: zlib is a Ruby interface for the zlib compression/decompression library. Versions 3.0.0 and below, 3.1.0, 3.1.1, 3.2.0 and 3.2.1 contain a buffer overflow vulnerability in the Zlib::GzipReader. The zstream_buffer_ungets function prepends caller-provided bytes ahead of previously produced output but fails to guarantee the backing Ruby string has enough capacity before the memmove shifts the existing data. This can lead to memory corruption when the buffer length exceeds capacity. This issue has been fixed in versions 3.0.1, 3.1.2 and 3.2.3.
- Impact: Attackers can cause memory corruption, potentially leading to application crashes or arbitrary code execution.
- Remediation: Update to versions 3.0.1, 3.1.2, 3.2.3 or later.
- Vulnerability type: buffer_overflow
- Vulnerability impact: remote_code_execution, denial_of_service
- Requirement type: none
- Labels source: projectdiscovery
- Severity: critical
- Cvss score: 9.8
- Cvss vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Epss score: 0.00583
- Epss percentile: 0.4854
- Assignee: [email protected]
- Published at: 2026-04-16T18:16:44Z
- Age in days: 222
- Modified at: 2026-10-26T21:10:00Z
- Patch available: yes
- References total: 2
- Products total: 1
- Oss: yes
- Projects total: 1
- Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2026-27820
- Nvd status: analyzed
- Checked, none or zero: known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, rejected by nvd
- Not known: requirements
Cwe
| Id | Name |
|---|---|
| CWE-120 | Buffer Copy without Checking Size of Input |
Hackerone
- Reports: 2
- Rank: 3806
References
| Url | Source | Tags |
|---|---|---|
| https://github.com/ruby/zlib/security/advisories/GHSA-g857-hhfv-j68w | nvd | Vendor Advisory |
| https://hackerone.com/reports/3467067 | nvd | Permissions Required |
Products
| Product | Affected | Platform bound | Sources | Url |
|---|---|---|---|---|
| ruby-lang:zlib | >= 3.2.0, < 3.2.3; >= 3.1.0, < 3.1.2; < 3.0.1 | no | nvd | /v1/products/ruby-lang/zlib |
Projects
| Repository | Link kinds | Indexed | Url |
|---|---|---|---|
| ruby/zlib | package, security_advisory | yes | /v1/repositories/ruby/zlib |
Index
- Repositories: 1
- Packages: 1
- Checked, none or zero: repositories high signal
Exploitation
- Remote: yes
- Hackerone reports: 2
- Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access, authentication required
- Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, exposed hosts