Vulnerability · Published Apr 16, 2026 · Assigned by GitHub_M

CVE-2026-27820zlib: Buffer Overflow in Zlib::GzipReader ungetc via large input leads to memory corruption

Low 1.7

In plain English

A low-severity buffer overflow in zlib from ruby. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.6% (higher than 47% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 4.0)1.7Low
Exploit odds (30 days)0.6%top 53.2% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official 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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
AlmaLinux:10ruby3.3.12-14.el10_2ALSA-2026:50778
AlmaLinux:8ruby3.3.12-8.module_el8.10.0+4241+4264e34bALSA-2026:50728
AlmaLinux:9ruby3.3.12-8.module_el9.8.0+288+22f1c9f2ALSA-2026:50828
AlmaLinux:9ruby4.0.6-34.module_el9.8.0+289+5a070f48ALSA-2026:50827
AlmaLinux:10ruby-bundled-gems3.3.12-14.el10_2ALSA-2026:50778
AlmaLinux:8ruby-bundled-gems3.3.12-8.module_el8.10.0+4241+4264e34bALSA-2026:50728
AlmaLinux:9ruby-bundled-gems3.3.12-8.module_el9.8.0+288+22f1c9f2ALSA-2026:50828
AlmaLinux:9ruby-bundled-gems4.0.6-34.module_el9.8.0+289+5a070f48ALSA-2026:50827
AlmaLinux:10ruby-default-gems3.3.12-14.el10_2ALSA-2026:50778
AlmaLinux:8ruby-default-gems3.3.12-8.module_el8.10.0+4241+4264e34bALSA-2026:50728
AlmaLinux:9ruby-default-gems3.3.12-8.module_el9.8.0+288+22f1c9f2ALSA-2026:50828
AlmaLinux:9ruby-default-gems4.0.6-34.module_el9.8.0+289+5a070f48ALSA-2026:50827
AlmaLinux:10ruby-devel3.3.12-14.el10_2ALSA-2026:50778
AlmaLinux:8ruby-devel3.3.12-8.module_el8.10.0+4241+4264e34bALSA-2026:50728
AlmaLinux:9ruby-devel4.0.6-34.module_el9.8.0+289+5a070f48ALSA-2026:50827
AlmaLinux:9ruby-devel3.3.12-8.module_el9.8.0+288+22f1c9f2ALSA-2026:50828
AlmaLinux:10ruby-doc3.3.12-14.el10_2ALSA-2026:50778
AlmaLinux:8ruby-doc3.3.12-8.module_el8.10.0+4241+4264e34bALSA-2026:50728
AlmaLinux:9ruby-doc4.0.6-34.module_el9.8.0+289+5a070f48ALSA-2026:50827
AlmaLinux:9ruby-doc3.3.12-8.module_el9.8.0+288+22f1c9f2ALSA-2026:50828
AlmaLinux:10ruby-libs3.3.12-14.el10_2ALSA-2026:50778
AlmaLinux:8ruby-libs3.3.12-8.module_el8.10.0+4241+4264e34bALSA-2026:50728
AlmaLinux:9ruby-libs4.0.6-34.module_el9.8.0+289+5a070f48ALSA-2026:50827
AlmaLinux:9ruby-libs3.3.12-8.module_el9.8.0+288+22f1c9f2ALSA-2026:50828
AlmaLinux:10ruby4.04.0.6-36.el10_2ALSA-2026:50773
AlmaLinux:10ruby4.0-devel4.0.6-36.el10_2ALSA-2026:50773
AlmaLinux:10ruby4.0-doc4.0.6-36.el10_2ALSA-2026:50773
AlmaLinux:10ruby4.0-rubygem-mysql20.5.7-36.el10_2ALSA-2026:50773
AlmaLinux:10ruby4.0-rubygem-pg1.6.3-36.el10_2ALSA-2026:50773
AlmaLinux:8rubygem-abrt0.4.0-1.module_el8.10.0+3799+191214ccALSA-2026:50728
AlmaLinux:8rubygem-abrt-doc0.4.0-1.module_el8.10.0+3799+191214ccALSA-2026:50728
AlmaLinux:10rubygem-bigdecimal3.1.5-14.el10_2ALSA-2026:50778
AlmaLinux:8rubygem-bigdecimal3.1.5-8.module_el8.10.0+4241+4264e34bALSA-2026:50728
AlmaLinux:9rubygem-bigdecimal3.1.5-8.module_el9.8.0+288+22f1c9f2ALSA-2026:50828
AlmaLinux:9rubygem-bigdecimal4.0.1-34.module_el9.8.0+289+5a070f48ALSA-2026:50827
AlmaLinux:10rubygem-bundler2.5.22-14.el10_2ALSA-2026:50778
AlmaLinux:8rubygem-bundler2.5.22-8.module_el8.10.0+4241+4264e34bALSA-2026:50728
AlmaLinux:9rubygem-bundler2.5.22-8.module_el9.8.0+288+22f1c9f2ALSA-2026:50828
AlmaLinux:9rubygem-bundler4.0.16-34.module_el9.8.0+289+5a070f48ALSA-2026:50827
AlmaLinux:10rubygem-io-console0.7.1-14.el10_2ALSA-2026:50778
AlmaLinux:8rubygem-io-console0.7.1-8.module_el8.10.0+4241+4264e34bALSA-2026:50728
AlmaLinux:9rubygem-io-console0.8.2-34.module_el9.8.0+289+5a070f48ALSA-2026:50827
AlmaLinux:9rubygem-io-console0.7.1-8.module_el9.8.0+288+22f1c9f2ALSA-2026:50828
AlmaLinux:10rubygem-irb1.13.1-14.el10_2ALSA-2026:50778
AlmaLinux:8rubygem-irb1.13.1-8.module_el8.10.0+4241+4264e34bALSA-2026:50728
AlmaLinux:9rubygem-irb1.13.1-8.module_el9.8.0+288+22f1c9f2ALSA-2026:50828
AlmaLinux:9rubygem-irb1.16.0-34.module_el9.8.0+289+5a070f48ALSA-2026:50827
AlmaLinux:10rubygem-json2.7.2-14.el10_2ALSA-2026:50778
AlmaLinux:8rubygem-json2.7.2-8.module_el8.10.0+4241+4264e34bALSA-2026:50728
AlmaLinux:9rubygem-json2.18.0-34.module_el9.8.0+289+5a070f48ALSA-2026:50827
AlmaLinux:9rubygem-json2.7.2-8.module_el9.8.0+288+22f1c9f2ALSA-2026:50828
AlmaLinux:10rubygem-minitest5.20.0-14.el10_2ALSA-2026:50778
AlmaLinux:8rubygem-minitest5.20.0-8.module_el8.10.0+4241+4264e34bALSA-2026:50728
AlmaLinux:9rubygem-minitest6.0.0-34.module_el9.8.0+289+5a070f48ALSA-2026:50827
AlmaLinux:9rubygem-minitest5.20.0-8.module_el9.8.0+288+22f1c9f2ALSA-2026:50828
AlmaLinux:8rubygem-mysql20.5.5-1.module_el8.10.0+3799+191214ccALSA-2026:50728
AlmaLinux:9rubygem-mysql20.5.5-3.module_el9.7.0+184+e2e36072ALSA-2026:50828
AlmaLinux:9rubygem-mysql20.5.7-1.module_el9.8.0+232+50f6dd36ALSA-2026:50827
AlmaLinux:8rubygem-mysql2-doc0.5.5-1.module_el8.10.0+3799+191214ccALSA-2026:50728
AlmaLinux:9rubygem-mysql2-doc0.5.7-1.module_el9.8.0+232+50f6dd36ALSA-2026:50827
AlmaLinux:9rubygem-mysql2-doc0.5.5-3.module_el9.7.0+184+e2e36072ALSA-2026:50828
AlmaLinux:8rubygem-pg1.5.4-1.module_el8.10.0+3799+191214ccALSA-2026:50728
AlmaLinux:9rubygem-pg1.6.3-1.module_el9.8.0+232+50f6dd36ALSA-2026:50827
AlmaLinux:9rubygem-pg1.5.4-2.module_el9.7.0+245+447713a2ALSA-2026:50828
AlmaLinux:8rubygem-pg-doc1.5.4-1.module_el8.10.0+3799+191214ccALSA-2026:50728
AlmaLinux:9rubygem-pg-doc1.6.3-1.module_el9.8.0+232+50f6dd36ALSA-2026:50827
AlmaLinux:9rubygem-pg-doc1.5.4-2.module_el9.7.0+245+447713a2ALSA-2026:50828
AlmaLinux:10rubygem-power_assert2.0.3-14.el10_2ALSA-2026:50778
AlmaLinux:8rubygem-power_assert2.0.3-8.module_el8.10.0+4241+4264e34bALSA-2026:50728
AlmaLinux:9rubygem-power_assert2.0.3-8.module_el9.8.0+288+22f1c9f2ALSA-2026:50828
AlmaLinux:9rubygem-power_assert3.0.1-34.module_el9.8.0+289+5a070f48ALSA-2026:50827
AlmaLinux:10rubygem-psych5.1.2-14.el10_2ALSA-2026:50778
AlmaLinux:8rubygem-psych5.1.2-8.module_el8.10.0+4241+4264e34bALSA-2026:50728
AlmaLinux:9rubygem-psych5.3.1-34.module_el9.8.0+289+5a070f48ALSA-2026:50827
AlmaLinux:9rubygem-psych5.1.2-8.module_el9.8.0+288+22f1c9f2ALSA-2026:50828
AlmaLinux:10rubygem-racc1.7.3-14.el10_2ALSA-2026:50778
AlmaLinux:8rubygem-racc1.7.3-8.module_el8.10.0+4241+4264e34bALSA-2026:50728
AlmaLinux:9rubygem-racc1.7.3-8.module_el9.8.0+288+22f1c9f2ALSA-2026:50828
AlmaLinux:9rubygem-racc1.8.1-34.module_el9.8.0+289+5a070f48ALSA-2026:50827
AlmaLinux:10rubygem-rake13.1.0-14.el10_2ALSA-2026:50778
AlmaLinux:8rubygem-rake13.1.0-8.module_el8.10.0+4241+4264e34bALSA-2026:50728
AlmaLinux:9rubygem-rake13.3.1-34.module_el9.8.0+289+5a070f48ALSA-2026:50827
AlmaLinux:9rubygem-rake13.1.0-8.module_el9.8.0+288+22f1c9f2ALSA-2026:50828
AlmaLinux:10rubygem-rbs3.4.0-14.el10_2ALSA-2026:50778
AlmaLinux:8rubygem-rbs3.4.0-8.module_el8.10.0+4241+4264e34bALSA-2026:50728
AlmaLinux:9rubygem-rbs3.10.0-34.module_el9.8.0+289+5a070f48ALSA-2026:50827
AlmaLinux:9rubygem-rbs3.4.0-8.module_el9.8.0+288+22f1c9f2ALSA-2026:50828
AlmaLinux:10rubygem-rdoc6.6.3.1-14.el10_2ALSA-2026:50778
AlmaLinux:8rubygem-rdoc6.6.3.1-8.module_el8.10.0+4241+4264e34bALSA-2026:50728
AlmaLinux:9rubygem-rdoc6.6.3.1-8.module_el9.8.0+288+22f1c9f2ALSA-2026:50828
AlmaLinux:9rubygem-rdoc7.0.4-34.module_el9.8.0+289+5a070f48ALSA-2026:50827
AlmaLinux:10rubygem-rexml3.4.4-14.el10_2ALSA-2026:50778
AlmaLinux:8rubygem-rexml3.4.4-8.module_el8.10.0+4241+4264e34bALSA-2026:50728
AlmaLinux:9rubygem-rexml3.4.4-8.module_el9.8.0+288+22f1c9f2ALSA-2026:50828
AlmaLinux:9rubygem-rexml3.4.4-34.module_el9.8.0+289+5a070f48ALSA-2026:50827
AlmaLinux:10rubygem-rss0.3.1-14.el10_2ALSA-2026:50778
AlmaLinux:8rubygem-rss0.3.1-8.module_el8.10.0+4241+4264e34bALSA-2026:50728
AlmaLinux:9rubygem-rss0.3.2-34.module_el9.8.0+289+5a070f48ALSA-2026:50827
AlmaLinux:9rubygem-rss0.3.1-8.module_el9.8.0+288+22f1c9f2ALSA-2026:50828
AlmaLinux:10rubygem-test-unit3.6.1-14.el10_2ALSA-2026:50778
AlmaLinux:8rubygem-test-unit3.6.1-8.module_el8.10.0+4241+4264e34bALSA-2026:50728
AlmaLinux:9rubygem-test-unit3.6.1-8.module_el9.8.0+288+22f1c9f2ALSA-2026:50828
AlmaLinux:9rubygem-test-unit3.7.5-34.module_el9.8.0+289+5a070f48ALSA-2026:50827
AlmaLinux:10rubygem-typeprof0.21.9-14.el10_2ALSA-2026:50778
AlmaLinux:8rubygem-typeprof0.21.9-8.module_el8.10.0+4241+4264e34bALSA-2026:50728
AlmaLinux:9rubygem-typeprof0.21.9-8.module_el9.8.0+288+22f1c9f2ALSA-2026:50828
AlmaLinux:9rubygem-typeprof0.31.1-34.module_el9.8.0+289+5a070f48ALSA-2026:50827
AlmaLinux:10rubygems3.5.22-14.el10_2ALSA-2026:50778
AlmaLinux:8rubygems3.5.22-8.module_el8.10.0+4241+4264e34bALSA-2026:50728
AlmaLinux:9rubygems3.5.22-8.module_el9.8.0+288+22f1c9f2ALSA-2026:50828
AlmaLinux:9rubygems4.0.16-34.module_el9.8.0+289+5a070f48ALSA-2026:50827
AlmaLinux:10rubygems-devel3.5.22-14.el10_2ALSA-2026:50778
AlmaLinux:8rubygems-devel3.5.22-8.module_el8.10.0+4241+4264e34bALSA-2026:50728
AlmaLinux:9rubygems-devel4.0.16-34.module_el9.8.0+289+5a070f48ALSA-2026:50827
AlmaLinux:9rubygems-devel3.5.22-8.module_el9.8.0+288+22f1c9f2ALSA-2026:50828
Alpine:v3.21ruby3.3.13-r0ALPINE-CVE-2026-27820
Alpine:v3.22ruby3.4.9-r0ALPINE-CVE-2026-27820
Alpine:v3.23ruby3.4.9-r0ALPINE-CVE-2026-27820
Alpine:v3.24ruby3.4.9-r0ALPINE-CVE-2026-27820
Debian:12ruby3.1no fix listedDEBIAN-CVE-2026-27820
Debian:13ruby3.3no fix listedDEBIAN-CVE-2026-27820
Debian:14ruby3.3no fix listedDEBIAN-CVE-2026-27820
Rocky Linux:10ruby0:3.3.12-14.el10_2RLSA-2026:50778
Rocky Linux:8ruby0:3.3.12-8.module+el8.10.0+40269+dc93e2d1RLSA-2026:50728
Rocky Linux:9ruby0:4.0.6-34.module+el9.8.0+40271+b5850c84RLSA-2026:50827
Rocky Linux:9ruby0:3.3.12-8.module+el9.8.0+40270+7a73441eRLSA-2026:50828
Rocky Linux:10ruby4.00:4.0.6-36.el10_2RLSA-2026:50773
Rocky Linux:8rubygem-abrt0:0.4.0-1.module+el8.10.0+1827+16ecb9d2RLSA-2026:50728
Rocky Linux:8rubygem-abrt0:0.4.0-1.module+el8.10.0+1820+f3fffb92RLSA-2026:50728
Rocky Linux:8rubygem-abrt0:0.4.0-1.module+el8.10.0+1826+b62220b4RLSA-2026:50728
Rocky Linux:8rubygem-abrt0:0.4.0-1.module+el8.9.0+1537+0b2034bdRLSA-2026:50728
Rocky Linux:8rubygem-abrt0:0.4.0-1.module+el8.5.0+668+665814faRLSA-2026:50728
Rocky Linux:8rubygem-abrt0:0.4.0-1.module+el8.10.0+1741+bdb5b6caRLSA-2026:50728
Rocky Linux:8rubygem-abrt0:0.4.0-1.module+el8.10.0+1679+61871737RLSA-2026:50728
Rocky Linux:8rubygem-mysql20:0.5.5-1.module+el8.10.0+1827+16ecb9d2RLSA-2026:50728
Rocky Linux:8rubygem-mysql20:0.5.5-1.module+el8.10.0+1679+61871737RLSA-2026:50728
Rocky Linux:9rubygem-mysql20:0.5.5-3.module+el9.7.0+40032+36e56d0dRLSA-2026:50828
Rocky Linux:9rubygem-mysql20:0.5.7-1.module+el9.8.0+40094+ce01217cRLSA-2026:50827
Rocky Linux:8rubygem-pg0:1.5.4-1.module+el8.10.0+1679+61871737RLSA-2026:50728
Rocky Linux:8rubygem-pg0:1.5.4-1.module+el8.10.0+1827+16ecb9d2RLSA-2026:50728
Rocky Linux:9rubygem-pg0:1.6.3-1.module+el9.8.0+40094+ce01217cRLSA-2026:50827
Rocky Linux:9rubygem-pg0:1.5.4-2.module+el9.7.0+40188+314ad260.0.1RLSA-2026:50828
RubyGemszlib3.1.2GHSA-g857-hhfv-j68w
RubyGemszlib3.2.3GHSA-g857-hhfv-j68w
RubyGemszlib3.0.1GHSA-g857-hhfv-j68w
Ubuntu:25.10jrubyno fix listedUBUNTU-CVE-2026-27820
Ubuntu:26.10jrubyno fix listedUBUNTU-CVE-2026-27820
Ubuntu:22.04:LTSruby3.0no fix listedUBUNTU-CVE-2026-27820
Ubuntu:24.04:LTSruby3.2no fix listedUBUNTU-CVE-2026-27820
Ubuntu:25.10ruby3.3no fix listedUBUNTU-CVE-2026-27820
Ubuntu:26.04:LTSruby3.3no fix listedUBUNTU-CVE-2026-27820
Ubuntu:26.10ruby3.3no fix listedUBUNTU-CVE-2026-27820

Affected products (as reported)

VendorProductVersions
ruby zlib < 3.0.1>= 3.1.0, < 3.1.2>= 3.2.0, < 3.2.3

Weakness: CWE-120, CWE-131 · 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

References