cve.bz

CVE-2026-27820 ruby-lang zlib: Classic Buffer Overflow

1.7 lowEPSS 0.6%Fix available

Low (1.7) in ruby-lang zlib. EPSS 0.6% estimated probability of exploitation activity in the next 30 days. Fixed in zlib 3.0.1, 3.1.2, 3.2.3.

On this page
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.

Severity

CVSS 4.0

1.7 low
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

CVSS 3.1

9.8 critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS
0.6% (unchanged from 0.6% a week ago; 0.8% 30 days ago) estimated probability of exploitation activity in the next 30 days; 49th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: yes · Technical impact: partial, assessed 2026-04-16. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWEs
CWE-120 Buffer Copy without Checking Size of Input (Classic Buffer Overflow)
CWE-131 Incorrect Calculation of Buffer Size
Published
Modified
NVD analysis
Analyzed
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2026-27820 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-27820?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-27820?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-27820 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
ruby-lang:zlibbefore 3.0.1
ruby-lang:zlibfrom 3.1.0 before 3.1.2
ruby-lang:zlibfrom 3.2.0 before 3.2.3

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-g857-hhfv-j68wRubyGemszlib>=3.2.0 <3.2.33.2.3
GHSA-g857-hhfv-j68wRubyGemszlib>=3.1.0 <3.1.23.1.2
GHSA-g857-hhfv-j68wRubyGemszlib<3.0.13.0.1

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian11ruby2.72.7.4-1+deb11u6DLA-4716-1
Debian12ruby3.1no fix listedDEBIAN-CVE-2026-27820
Debian13ruby3.33.3.13-0+deb13u1DEBIAN-CVE-2026-27820 DSA-6614-1
Debian14ruby3.3no fix listedDEBIAN-CVE-2026-27820
Ubuntu22.04:LTSruby3.0no fix listedUBUNTU-CVE-2026-27820
Ubuntu24.04:LTSruby3.2no fix listedUBUNTU-CVE-2026-27820
Ubuntu25.10, 26.10jruby, ruby3.3no fix listedUBUNTU-CVE-2026-27820
Ubuntu26.04:LTSruby3.3no fix listedUBUNTU-CVE-2026-27820
UbuntuPro:16.04:LTSruby2.32.3.1-2~ubuntu16.04.16+esm15UBUNTU-CVE-2026-27820 USN-8556-1
UbuntuPro:18.04:LTSruby2.5no fix listedUBUNTU-CVE-2026-27820
UbuntuPro:20.04:LTSruby2.7no fix listedUBUNTU-CVE-2026-27820
Red Hatenterprise_linux:8::appstreamruby, ruby-doc, ruby-libs and 7 more0:3.3.12-8.module+el8.10.0+24567+c4e5368eRHSA-2026:50728
Red Hatenterprise_linux:8::appstreamrubygem-abrt, rubygem-abrt-doc0:0.4.0-1.module+el8.10.0+21226+b78a28c4RHSA-2026:50728
Red Hatenterprise_linux:8::appstreamrubygem-bigdecimal, rubygem-bigdecimal-debuginfo0:3.1.5-8.module+el8.10.0+24567+c4e5368eRHSA-2026:50728
Red Hatenterprise_linux:8::appstreamrubygem-bundler0:2.5.22-8.module+el8.10.0+24567+c4e5368eRHSA-2026:50728
Red Hatenterprise_linux:8::appstreamrubygem-io-console, rubygem-io-console-debuginfo0:0.7.1-8.module+el8.10.0+24567+c4e5368eRHSA-2026:50728
Red Hatenterprise_linux:8::appstreamrubygem-irb0:1.13.1-8.module+el8.10.0+24567+c4e5368eRHSA-2026:50728
Red Hatenterprise_linux:8::appstreamrubygem-json, rubygem-json-debuginfo0:2.7.2-8.module+el8.10.0+24567+c4e5368eRHSA-2026:50728
Red Hatenterprise_linux:8::appstreamrubygem-minitest0:5.20.0-8.module+el8.10.0+24567+c4e5368eRHSA-2026:50728
Red Hatenterprise_linux:8::appstreamrubygem-mysql2, rubygem-mysql2-doc, rubygem-mysql2-debuginfo and 1 more0:0.5.5-1.module+el8.10.0+21226+b78a28c4RHSA-2026:50728
Red Hatenterprise_linux:8::appstreamrubygem-pg, rubygem-pg-doc, rubygem-pg-debuginfo and 1 more0:1.5.4-1.module+el8.10.0+21226+b78a28c4RHSA-2026:50728
Red Hatenterprise_linux:8::appstreamrubygem-power_assert0:2.0.3-8.module+el8.10.0+24567+c4e5368eRHSA-2026:50728
Red Hatenterprise_linux:8::appstreamrubygem-psych, rubygem-psych-debuginfo0:5.1.2-8.module+el8.10.0+24567+c4e5368eRHSA-2026:50728
72 more for Red Hat in the JSON and on Red Hat's page.
SUSELinux Enterprise Module for Basesystem 15 SP7ruby2.52.5.9-150700.24.6.1SUSE-SU-2026:1066-1
openSUSELeap 16.0ruby3.43.4.10-160000.1.1openSUSE-SU-2026:21878-1
AlmaLinux8ruby, ruby-doc, ruby-libs and 3 more3.3.12-8.module_el8.10.0+4241+4264e34bALSA-2026:50728
AlmaLinux8rubygem-abrt, rubygem-abrt-doc0.4.0-1.module_el8.10.0+3799+191214ccALSA-2026:50728
AlmaLinux8rubygem-bigdecimal3.1.5-8.module_el8.10.0+4241+4264e34bALSA-2026:50728
AlmaLinux8rubygem-bundler2.5.22-8.module_el8.10.0+4241+4264e34bALSA-2026:50728
AlmaLinux8rubygem-io-console0.7.1-8.module_el8.10.0+4241+4264e34bALSA-2026:50728
AlmaLinux8rubygem-irb1.13.1-8.module_el8.10.0+4241+4264e34bALSA-2026:50728
AlmaLinux8rubygem-json2.7.2-8.module_el8.10.0+4241+4264e34bALSA-2026:50728
AlmaLinux8rubygem-minitest5.20.0-8.module_el8.10.0+4241+4264e34bALSA-2026:50728
AlmaLinux8rubygem-mysql2, rubygem-mysql2-doc0.5.5-1.module_el8.10.0+3799+191214ccALSA-2026:50728
AlmaLinux8rubygem-pg, rubygem-pg-doc1.5.4-1.module_el8.10.0+3799+191214ccALSA-2026:50728
AlmaLinux8rubygem-power_assert2.0.3-8.module_el8.10.0+4241+4264e34bALSA-2026:50728
AlmaLinux8rubygem-psych5.1.2-8.module_el8.10.0+4241+4264e34bALSA-2026:50728
61 more for AlmaLinux in the JSON.
Rocky Linux8ruby0:3.3.12-8.module+el8.10.0+40269+dc93e2d1RLSA-2026:50728
Rocky Linux8rubygem-abrt0:0.4.0-1.module+el8.10.0+1679+61871737RLSA-2026:50728
Rocky Linux8rubygem-abrt0:0.4.0-1.module+el8.10.0+1741+bdb5b6caRLSA-2026:50728
Rocky Linux8rubygem-abrt0:0.4.0-1.module+el8.10.0+1820+f3fffb92RLSA-2026:50728
Rocky Linux8rubygem-abrt0:0.4.0-1.module+el8.10.0+1826+b62220b4RLSA-2026:50728
Rocky Linux8rubygem-abrt0:0.4.0-1.module+el8.10.0+1827+16ecb9d2RLSA-2026:50728
Rocky Linux8rubygem-abrt0:0.4.0-1.module+el8.5.0+668+665814faRLSA-2026:50728
Rocky Linux8rubygem-abrt0:0.4.0-1.module+el8.9.0+1537+0b2034bdRLSA-2026:50728
Rocky Linux8rubygem-mysql20:0.5.5-1.module+el8.10.0+1679+61871737RLSA-2026:50728
Rocky Linux8rubygem-mysql20:0.5.5-1.module+el8.10.0+1827+16ecb9d2RLSA-2026:50728
Rocky Linux8rubygem-pg0:1.5.4-1.module+el8.10.0+1679+61871737RLSA-2026:50728
Rocky Linux8rubygem-pg0:1.5.4-1.module+el8.10.0+1827+16ecb9d2RLSA-2026:50728
8 more for Rocky Linux in the JSON.
Alpinev3.21ruby3.3.13-r0ALPINE-CVE-2026-27820
Alpinev3.22, v3.23, v3.24ruby3.4.9-r0ALPINE-CVE-2026-27820
Azure Linux3ruby3.3.5-8AZL-83450
Alpaquita23ruby3.3.10-r1BELL-CVE-2026-27820
Alpaquita25, streamruby3.4.9-r0BELL-CVE-2026-27820

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; AlmaLinux's OSV database, MIT; Rocky Linux's errata, BSD-3-Clause; the Alpine secdb, CC BY-SA 4.0; Microsoft's Azure Linux vulnerability data, MIT; BellSoft's OSV database, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE · Alpine · Alpaquita.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

A buffer overflow vulnerability exists in the Zlib::GzipReader component of the Ruby zlib interface. This flaw, caused by insufficient memory capacity during data manipulation, could lead to memory corruption and system instability. This vulnerability is considered of a Moderate severity this happens because the high complexity to exploit, additionally the attacker may have not full control over the data is being corrupted or exfiltrated.

Red Hat's mitigation

Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 10ruby4.0-0:4.0.6-36.el10_2Fixed 2026-08-05RHSA-2026:50773
Red Hat Enterprise Linux 10ruby-0:3.3.12-14.el10_2Fixed 2026-08-05RHSA-2026:50778
Red Hat Enterprise Linux 8ruby:3.3-8100020260727154509.489197e6Fixed 2026-08-05RHSA-2026:50728
Red Hat Enterprise Linux 9ruby:4.0-9080020260727092509.9Fixed 2026-08-05RHSA-2026:50827
Red Hat Enterprise Linux 9ruby:3.3-9080020260728061751.9Fixed 2026-08-05RHSA-2026:50828
Red Hat Hardened Imagesruby3-3-main-3.3.10-23.1.hum1Fixed 2026-04-09RHSA-2026:7305
Red Hat Hardened Imagesruby3-4-main-3.4.8-31.1.hum1Fixed 2026-04-09RHSA-2026:7307
Red Hat Hardened Imagesruby4-0-main-4.0.0-33.3.hum1Fixed 2026-04-17RHSA-2026:8838
Red Hat Enterprise Linux 6rubyFix deferred
Red Hat Enterprise Linux 7rubyFix deferred
Red Hat Enterprise Linux 8ruby:2.5/rubyFix deferred
Red Hat Enterprise Linux 9rubyFix deferred

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-27820.

Attack patterns (CAPEC)

  • CAPEC-47 Buffer Overflow via Parameter Expansion Likelihood: Medium · Severity: High
  • CAPEC-100 Overflow Buffers Likelihood: High · Severity: Very High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits. More on the page of CWE-120 (13).

References

Check your stackJSON