CVE-2026-27820

critical
Published 2026-03-05 · Modified 2026-04-16
CVSS v3
9.8
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS v2
VIR risk
9.8

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.

Predictions

Exploit likelihood
97%
Patch ETA

Heuristic predictions, AS-IS, for prioritization only.

Mitigations

vendor Authored 2026-05-27

Vendor advisory: debian — https://security-tracker.debian.org/tracker/CVE-2026-27820

vendor Authored 2026-05-27

Vendor advisory: suse — https://www.suse.com/security/cve/CVE-2026-27820.html

vendor Authored 2026-05-27

Vendor advisory: security-advisories@github.com — https://github.com/ruby/zlib/security/advisories/GHSA-g857-hhfv-j68w

OS impact

OSVersionStatusFixed in
suse slesaffected
debian debianbookwormaffected
debian debianbullseyeaffected
debian debianforkyaffected
debian debiansidaffected
debian debiantrixieaffected

Package impact

EcosystemPackageVulnerableFixed
ruby RubyGemszlib<~> 3.0.1~> 3.0.1
ruby RubyGemszlib>=3.2.0,<3.2.33.2.3
ruby RubyGemszlib>=3.1.0,<3.1.23.1.2
ruby RubyGemszlib<3.0.13.0.1

Application impact

VendorProductVersionsFixed
ruby ruby-langzlib{"endExcluding":"3.0.1"}3.0.1

References

CWEs

CWE-120 CWE-131

Verify integrity in audit chain (admin only). AS-IS.