{"cve":"CVE-2026-27820","nvd":{"published":"2026-04-16T18:16:44.770","modified":"2026-10-26T21:10:00.170","status":"Analyzed","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.","cvss_v4":{"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","score":1.7},"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8},"cwes":["CWE-120","CWE-131"],"references":["https://github.com/ruby/zlib/security/advisories/GHSA-g857-hhfv-j68w","https://hackerone.com/reports/3467067"],"products":["ruby-lang:zlib"],"source":"nvd","synced_at":"2026-10-26T21:38:48.864438205+00:00"},"epss":{"cve":"CVE-2026-27820","score":0.00561,"percentile":0.46397,"date":"2026-10-26"},"kev":null,"osv":[{"id":"GHSA-g857-hhfv-j68w","url":"https://osv.dev/vulnerability/GHSA-g857-hhfv-j68w","summary":"Buffer Overflow in Zlib::GzipReader ungetc via large input leads to memory corruption","modified":"2026-09-10T03:50:44.477881992Z","packages":[{"ecosystem":"RubyGems","name":"zlib","purl":"pkg:gem/zlib","ranges":[">=3.2.0 <3.2.3"],"fixed":["3.2.3"]},{"ecosystem":"RubyGems","name":"zlib","purl":"pkg:gem/zlib","ranges":[">=3.1.0 <3.1.2"],"fixed":["3.1.2"]},{"ecosystem":"RubyGems","name":"zlib","purl":"pkg:gem/zlib","ranges":["<3.0.1"],"fixed":["3.0.1"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}