CVE-2026-27820 zlib: Buffer Overflow in Zlib::GzipReader ungetc via large input leads to memory corruption
- Published
- Updated
- Exploit status
- Proof-of-concept only
- CISA SSVC
- No known exploitation · automatable: yes · technical impact: partial
- Technology
- UbuntuDebianRed Hat
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.
Upgrade path
29 packages: 13 fixed, 15 with no fix yet.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| azure linux zlib(Azure Linux 3.0) | All versions | No fix listed | No fix yet |
| debian/ruby3.1(Debian 12) | = 3.1.2-7; = 3.1.2-7+deb12u1; = 3.1.2-7+hurd.1; = 3.1.2-8 +5 more | No fix listed | No fix yet |
| debian/ruby3.3(Debian 14) | = 3.3.8-2; = 3.3.8-2.1; = 3.3.8-2.2; All versions | No fix listed | No fix yet |
| redhat/ruby(Red Hat enterprise_linux 9) | All versions | No fix listed | No fix yet |
| redhat/ruby(Red Hat rhel_els 6) | All versions | No fix listed | No fix yet |
| redhat/ruby(Red Hat rhel_els 7) | All versions | No fix listed | No fix yet |
| redhat/ruby:2.5/ruby(Red Hat enterprise_linux 8) | All versions | No fix listed | No fix yet |
| redhat/ruby:3.3-8100020260727154509.489197e6(Red Hat enterprise_linux 8) | All versions | No fix listed | No fix yet |
| redhat/ruby:3.3-9080020260728061751.9(Red Hat enterprise_linux 9) | All versions | No fix listed | No fix yet |
| redhat/ruby:4.0-9080020260727092509.9(Red Hat enterprise_linux 9) | All versions | No fix listed | No fix yet |
| ubuntu/jruby(Ubuntu 26.10) | All versions | No fix listed | No fix yet |
| ubuntu/ruby3.0(Ubuntu 22.04) | All versions | No fix listed | No fix yet |
| ubuntu/ruby3.2(Ubuntu 24.04) | All versions | No fix listed | No fix yet |
| ubuntu/ruby3.3(Ubuntu 26.04) | All versions | No fix listed | No fix yet |
| ubuntu/ruby3.3(Ubuntu 26.10) | All versions | No fix listed | No fix yet |
| alpine/ruby(Alpine v3.21) | < 3.3.13-r0 | 3.3.13-r0 | Fixed |
| alpine/ruby(Alpine v3.22) | < 3.4.9-r0 | 3.4.9-r0 | Fixed |
| alpine/ruby(Alpine v3.23) | < 3.4.9-r0 | 3.4.9-r0 | Fixed |
| alpine/ruby(Alpine v3.24) | < 3.4.9-r0 | 3.4.9-r0 | Fixed |
| azure linux ruby(Azure Linux 3.0) | < 3.3.5-8 | 3.3.5-8 | Fixed |
| debian/ruby3.3(Debian 13) | < 3.3.13-0+deb13u1; = 3.3.8-2; = 3.3.8-2.1; = 3.3.8-2.2 | 3.3.13-0+deb13u1 | Fixed |
| redhat/ruby(Red Hat enterprise_linux 10.2) | < 3.3.12-14.el10_2 | 3.3.12-14.el10_2 | Fixed |
| redhat/ruby3-3-main(Red Hat hummingbird 1) | < 3.3.10-23.1.hum1 | 3.3.10-23.1.hum1 | Fixed |
| redhat/ruby3-4-main(Red Hat hummingbird 1) | < 3.4.8-31.1.hum1 | 3.4.8-31.1.hum1 | Fixed |
| redhat/ruby4-0-main(Red Hat hummingbird 1) | < 4.0.0-33.3.hum1 | 4.0.0-33.3.hum1 | Fixed |
| redhat/ruby4.0(Red Hat enterprise_linux 10.2) | < 4.0.6-36.el10_2 | 4.0.6-36.el10_2 | Fixed |
| ruby-lang zlib | < 3.0.1; >= 3.1.0, < 3.1.2; >= 3.2.0, < 3.2.3 | 3.0.1, 3.1.2, 3.2.3 | Fixed |
| rubygems zlib(RubyGems) | < 3.0.1; = 0.0.1; = 0.1.0; = 1.0.0 +12 more | 3.0.1, 3.1.2, 3.2.3 | Fixed |
| ruby zlib | = < 3.0.1; = >= 3.1.0, < 3.1.2; = >= 3.2.0, < 3.2.3 | No fix listed | Versions listed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| azure linux ruby(Azure Linux:3.0) | < 3.3.5-8 | 3.3.5-8 |
| azure linux zlib(Azure Linux:3.0) | All versions | No fix listed |
| rubygems zlib(RubyGems) | >= 3.2.0, < 3.2.3 | 3.2.3 |
| rubygems zlib(RubyGems) | = 3.2.0 | No fix listed |
| rubygems zlib(RubyGems) | = 3.2.1 | No fix listed |
| rubygems zlib(RubyGems) | = 3.2.2 | No fix listed |
| rubygems zlib(RubyGems) | >= 3.1.0, < 3.1.2 | 3.1.2 |
| rubygems zlib(RubyGems) | = 3.1.0 | No fix listed |
| rubygems zlib(RubyGems) | = 3.1.1 | No fix listed |
| rubygems zlib(RubyGems) | < 3.0.1 | 3.0.1 |
| rubygems zlib(RubyGems) | = 0.0.1 | No fix listed |
| rubygems zlib(RubyGems) | = 0.1.0 | No fix listed |
| rubygems zlib(RubyGems) | = 1.0.0 | No fix listed |
| rubygems zlib(RubyGems) | = 1.1.0 | No fix listed |
| rubygems zlib(RubyGems) | = 2.0.0 | No fix listed |
| rubygems zlib(RubyGems) | = 2.1.0 | No fix listed |
| rubygems zlib(RubyGems) | = 2.1.1 | No fix listed |
| rubygems zlib(RubyGems) | = 3.0.0 | No fix listed |
| ruby zlib | = < 3.0.1 | No fix listed |
| ruby zlib | = >= 3.1.0, < 3.1.2 | No fix listed |
| ruby zlib | = >= 3.2.0, < 3.2.3 | No fix listed |
| debian/ruby3.1(Debian:12) | All versions | No fix listed |
| debian/ruby3.1(Debian:12) | = 3.1.2-7 | No fix listed |
| debian/ruby3.1(Debian:12) | = 3.1.2-7+deb12u1 | No fix listed |
| debian/ruby3.1(Debian:12) | = 3.1.2-7+hurd.1 | No fix listed |
Show 37 more
| Product | Affected versions | Fixed in |
|---|---|---|
| debian/ruby3.1(Debian:12) | = 3.1.2-8 | No fix listed |
| debian/ruby3.1(Debian:12) | = 3.1.2-8.1~exp1 | No fix listed |
| debian/ruby3.1(Debian:12) | = 3.1.2-8.3 | No fix listed |
| debian/ruby3.1(Debian:12) | = 3.1.2-8.4 | No fix listed |
| debian/ruby3.1(Debian:12) | = 3.1.2-8.5 | No fix listed |
| debian/ruby3.3(Debian:13) | < 3.3.13-0+deb13u1 | 3.3.13-0+deb13u1 |
| debian/ruby3.3(Debian:13) | = 3.3.8-2 | No fix listed |
| debian/ruby3.3(Debian:13) | = 3.3.8-2.1 | No fix listed |
| debian/ruby3.3(Debian:13) | = 3.3.8-2.2 | No fix listed |
| debian/ruby3.3(Debian:14) | All versions | No fix listed |
| debian/ruby3.3(Debian:14) | = 3.3.8-2 | No fix listed |
| debian/ruby3.3(Debian:14) | = 3.3.8-2.1 | No fix listed |
| debian/ruby3.3(Debian:14) | = 3.3.8-2.2 | No fix listed |
| redhat/ruby4.0(Red Hat:enterprise_linux:10.2) | < 4.0.6-36.el10_2 | 4.0.6-36.el10_2 |
| redhat/ruby(Red Hat:enterprise_linux:10.2) | < 3.3.12-14.el10_2 | 3.3.12-14.el10_2 |
| redhat/ruby:3.3-8100020260727154509.489197e6(Red Hat:enterprise_linux:8) | All versions | No fix listed |
| redhat/ruby:4.0-9080020260727092509.9(Red Hat:enterprise_linux:9) | All versions | No fix listed |
| redhat/ruby:3.3-9080020260728061751.9(Red Hat:enterprise_linux:9) | All versions | No fix listed |
| redhat/ruby3-3-main(Red Hat:hummingbird:1) | < 3.3.10-23.1.hum1 | 3.3.10-23.1.hum1 |
| redhat/ruby3-4-main(Red Hat:hummingbird:1) | < 3.4.8-31.1.hum1 | 3.4.8-31.1.hum1 |
| redhat/ruby4-0-main(Red Hat:hummingbird:1) | < 4.0.0-33.3.hum1 | 4.0.0-33.3.hum1 |
| redhat/ruby(Red Hat:rhel_els:6) | All versions | No fix listed |
| redhat/ruby(Red Hat:rhel_els:7) | All versions | No fix listed |
| redhat/ruby:2.5/ruby(Red Hat:enterprise_linux:8) | All versions | No fix listed |
| redhat/ruby(Red Hat:enterprise_linux:9) | All versions | No fix listed |
| ubuntu/ruby3.0(Ubuntu:22.04) | All versions | No fix listed |
| alpine/ruby(Alpine:v3.21) | < 3.3.13-r0 | 3.3.13-r0 |
| alpine/ruby(Alpine:v3.22) | < 3.4.9-r0 | 3.4.9-r0 |
| alpine/ruby(Alpine:v3.23) | < 3.4.9-r0 | 3.4.9-r0 |
| alpine/ruby(Alpine:v3.24) | < 3.4.9-r0 | 3.4.9-r0 |
| ubuntu/ruby3.2(Ubuntu:24.04) | All versions | No fix listed |
| ubuntu/ruby3.3(Ubuntu:26.04) | All versions | No fix listed |
| ubuntu/jruby(Ubuntu:26.10) | All versions | No fix listed |
| ubuntu/ruby3.3(Ubuntu:26.10) | All versions | No fix listed |
| ruby-lang zlib | < 3.0.1 | 3.0.1 |
| ruby-lang zlib | >= 3.1.0, < 3.1.2 | 3.1.2 |
| ruby-lang zlib | >= 3.2.0, < 3.2.3 | 3.2.3 |
References
- MSRC Security Update Guide vendor-advisory
- CBL-Mariner Releases vendor-advisory
- https://github.com/ruby/zlib/security/advisories/GHSA-g857-hhfv-j68w vendor-advisory
- nvd.nist.gov third-party-advisory vendor-advisory
- https://hackerone.com/reports/3467067 permissions-required
- github.com product
- github.com exploit
- www.ruby-lang.org
- github.com
- Debian Security Tracker CVE-2026-27820 vendor-advisory
- Red Hat CVE page mitigation vendor-advisory
- RHSA-2026:50773 patch vendor-advisory
- RHSA-2026:50778 patch vendor-advisory
- RHSA-2026:50728 patch vendor-advisory
- RHSA-2026:50827 patch vendor-advisory
- RHSA-2026:50828 patch vendor-advisory
- RHSA-2026:7305 patch vendor-advisory
- RHSA-2026:7307 patch vendor-advisory
- RHSA-2026:8838 patch vendor-advisory
- Red Hat Bugzilla 2459002 issue-tracking
- www.cve.org
- Ubuntu CVE tracker vendor-advisory
- USN-8556-1 vendor-advisory
- security.alpinelinux.org vendor-advisory
- bugs.debian.org issue-tracking