-
-
Notifications
You must be signed in to change notification settings - Fork 231
Expand file tree
/
Copy pathCVE-2026-27820.yml
More file actions
49 lines (40 loc) · 1.59 KB
/
CVE-2026-27820.yml
File metadata and controls
49 lines (40 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
---
gem: zlib
cve: 2026-27820
ghsa: g857-hhfv-j68w
url: https://www.ruby-lang.org/en/news/2026/03/05/buffer-overflow-zlib-cve-2026-27820
title: Buffer overflow vulnerability in Zlib::GzipReader
date: 2026-03-05
description: |
A buffer overflow vulnerability exists in Zlib::GzipReader.
This vulnerability has been assigned the CVE identifier
CVE-2026-27820. We recommend upgrading the zlib gem.
## Details
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.
## Recommended action
We recommend to update the zlib gem to version 3.2.3 or later.
In order to ensure compatibility with bundled version in older
Ruby series, you may update as follows instead:
* For Ruby 3.2 users: Update to zlib 3.0.1
* For Ruby 3.3 users: Update to zlib 3.1.2
* You can use gem update zlib to update it. If you are using
bundler, please add gem "zlib", ">= 3.2.3" to your Gemfile.
## Affected versions:
zlib gem 3.2.2 or lower
## Credits
Thanks to calysteon for reporting this issue. Also thanks to
nobu for creating the patch.
patched_versions:
- "~> 3.0.1"
- "~> 3.1.2"
- ">= 3.2.3"
related:
url:
- https://www.ruby-lang.org/en/news/2026/03/05/buffer-overflow-zlib-cve-2026-27820
- https://rubygems.org/gems/zlib/versions/3.2.3
- https://rubygems.org/gems/zlib/versions/3.1.2
- https://rubygems.org/gems/zlib/versions/3.0.1