Live threats

All CVEs / Ruby-lang

CVE-2026-27820Ruby-lang Zlib

Low 1.7 No auth needed

Priority
25
CVSS 4.0
1.7
EPSS
—
Auth required
No
Published
Apr 16, 2026
Updated
Oct 26, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-120, CWE-131
SSVC (CISA)
Exploitation: none · Automatable: yes · Technical impact: partial
Vector
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:U/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

What happens

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.

Original NVD text.

What to do

  1. Apply the vendor's security update for Zlib.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
RubyGems zlib ≥ 3.2.0 < 3.2.3 3.2.3 gem "zlib", ">= 3.2.3"
RubyGems zlib ≥ 3.1.0 < 3.1.2 3.1.2 gem "zlib", ">= 3.1.2"
RubyGems zlib < 3.0.1 3.0.1 gem "zlib", ">= 3.0.1"

Per OSV / GitHub Advisories (GHSA-g857-hhfv-j68w). Check the version in your lockfile before upgrading.

Affected products (CPE)

VendorProductVersions
ruby-langzlib< 3.0.1
ruby-langzlib≥ 3.1.0 < 3.1.2
ruby-langzlib≥ 3.2.0 < 3.2.3

Official advisories

Also: Red Hat (+5), SUSE (+1)

Vendor, CERT and distribution advisories that name this CVE. Original titles.

Official sources

References

Links published by the sources. Open them with care.