VDB

CVE-2026-27820

CVE-2026-27820 PUBLISHED CVSS 1.7 LOW

Buffer Overflow in Zlib::GzipReader ungetc via large input leads to memory corruption

Reported by github_m · Published April 16, 2026

zlib is fixed in 3.2.3, 3.1.2 and 3.0.1 (RubyGems)

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.

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
zlibRubyGems3.2.3, 3.1.2, 3.0.1
rubygem-rexmlerrata.rockylinux.org3.4.4-14.el10
rubygem-io-consoleerrata.rockylinux.org0.8.2-34.module, 0.7.1-8.module
ruby-default-gemserrata.rockylinux.org4.0.6-34.module, 3.3.12-8.module
rubygem-bundlererrata.rockylinux.org4.0.16-34.module, 2.5.22-14.el10, 2.5.22-8.module
rubygemserrata.rockylinux.org3.5.22-14.el10
rubygem-bigdecimalerrata.rockylinux.org4.0.1-34.module, 3.1.5-14.el10, 3.1.5-8.module
rubygems-develerrata.rockylinux.org4.0.16-34.module, 3.5.22-14.el10, 3.5.22-8.module
rubygem-psycherrata.rockylinux.org5.1.2-14.el10, 5.1.2-8.module
rubygem-rdocerrata.rockylinux.org6.6.3.1-14.el10, 6.6.3.1-8.module
rubygem-minitesterrata.rockylinux.org6.0.0-34.module, 5.20.0-14.el10, 5.20.0-8.module
ruby-develerrata.rockylinux.org4.0.6-34.module, 3.3.12-14.el10, 3.3.12-8.module

37 more packages have a fixed version. See every fix in Lookup.

Risk scores

CVSS 4.0
1.7
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

Affected products

VendorProductVersions
rubyzlib< 3.0.1, >= 3.1.0, < 3.1.2, >= 3.2.0, < 3.2.3
amazon:2023ruby3.4-rubygem-power_assert0
amazon:2023ruby3.4-rubygem-racc0
alpineruby0, 0
amazon:2023ruby3.4-doc0
amazon:2023ruby3.4-rubygem-rbs0
amazon:2023ruby3.4-rubygem-minitest0
amazon:2023ruby3.4-rubygem-irb0
RubyGemszlib3.2.0, 0, 3.1.0
chainguardtruffleruby0
amazon:2023ruby3.4-rubygem-bundler0
amazon:2023ruby3.4-bundled-gems0
rubyzlib3.2.0, 0, 3.1.0
amazon:2023ruby3.4-default-gems0
amazon:2023ruby3.4-rubygem-rss0
amazon:2023ruby3.4-rubygem-rake0
amazon:2023ruby3.4-devel0
amazon:2023ruby3.4-rubygem-typeprof0
amazon:2023ruby3.4-rubygem-psych0
amazon:2023ruby3.4-rubygem-json0

…and 9 more

Timeline

  • Mar 4, 2026 CVE Published
  • Mar 5, 2026 PoC Published (3 in total, the first dated here)
  • Apr 16, 2026 CVE Updated
  • Apr 17, 2026 Security Advisory (6 in total, the first dated here)
  • May 18, 2026 EPSS Score (30 in total, the first dated here)
  • Jul 5, 2026 Coalition ESS Score
  • Aug 11, 2026 Distribution Patch (10 in total, the first dated here)

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2026-27820
vulnetix vdb fixes CVE-2026-27820

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2026-27820/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›