{"schemaVersion":3,"id":"CVE-2026-27820","aliases":["ALPINE-CVE-2026-27820","UBUNTU-CVE-2026-27820","DEBIAN-CVE-2026-27820","CGA-74vg-9qrm-r27f","CGA-gx38-97hq-2r5c","GHSA-g857-hhfv-j68w"],"status":"published","duplicateOf":null,"title":null,"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.","dates":{"published":"2026-04-16T17:27:48.944Z","modified":"2026-04-16T18:20:21.451Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":9.8,"severity":"critical","version":"3.1","versionLabel":"v3.1","source":"NVD","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","computed":false,"selection":"backend-summary"},"metrics":[{"version":"4.0","versionLabel":"v4.0","source":"CVE.org","score":1.7,"severity":"low","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","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Alpine","score":9.8,"severity":"critical","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","exploitability":10,"impact":9.8,"computed":true},{"version":"4.0","versionLabel":"v4.0","source":"OSV · Ubuntu","score":6.3,"severity":"medium","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","exploitability":null,"impact":null,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Ubuntu","score":9.8,"severity":"critical","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","exploitability":10,"impact":9.8,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Debian","score":9.8,"severity":"critical","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","exploitability":10,"impact":9.8,"computed":true},{"version":"4.0","versionLabel":"v4.0","source":"OSV · Chainguard","score":6.3,"severity":"medium","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","exploitability":null,"impact":null,"computed":true},{"version":"4.0","versionLabel":"v4.0","source":"OSV · Rubygems","score":8.5,"severity":"high","vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:U","exploitability":null,"impact":null,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Rubygems","score":9.8,"severity":"critical","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","exploitability":10,"impact":9.8,"computed":true},{"version":"4.0","versionLabel":"v4.0","source":"NVD","score":1.7,"severity":"low","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/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":9.8,"severity":"critical","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.00752,"percentile":0.54191,"severity":"low","asOf":"2026-10-19T00:00:00.000Z","change":{"pp":0.19099999999999995,"baselineDate":"2026-09-19T00:00:00.000Z","baselineScore":0.00561},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.00561,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.00561,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.00561,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.00561,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.00561,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.00561,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.00561,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.00561,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.00561,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.00561,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.00752,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.00752,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.00752,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.00752,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.00752,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.00752,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.00752,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.00752,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.00752,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.00752,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.00752,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.00752,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.00752,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.00752,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.00752,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.00752,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.00752,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.00752,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.00752,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.00752,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.00752,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.00752,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.00752,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.00752,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.00752,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.00752,"percentile":0.54191}],"last30":[{"date":"2026-09-19T00:00:00.000Z","score":0.00561,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.00561,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.00561,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.00561,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.00561,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.00752,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.00752,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.00752,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.00752,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.00752,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.00752,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.00752,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.00752,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.00752,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.00752,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.00752,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.00752,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.00752,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.00752,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.00752,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.00752,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.00752,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.00752,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.00752,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.00752,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.00752,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.00752,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.00752,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.00752,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.00752,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.00752,"percentile":0.54191}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[],"exploitCount":0,"weaknesses":[{"id":"CWE-120","name":"Buffer Copy without Checking Size of Input ('Classic Buffer Overflow')","description":"The product copies an input buffer to an output buffer without verifying that the size of the input buffer is less than the size of the output buffer.","type":"weakness","status":"Incomplete","abstraction":"Base","likelihoodOfExploit":"High","url":"https://cwe.mitre.org/data/definitions/120.html"},{"id":"CWE-131","name":"Incorrect Calculation of Buffer Size","description":"The product does not correctly calculate the size to be used when allocating a buffer, which could lead to a buffer overflow.","type":"weakness","status":"Draft","abstraction":"Base","likelihoodOfExploit":"High","url":"https://cwe.mitre.org/data/definitions/131.html"}],"affected":[{"vendor":"alpine","product":"ruby","name":"ruby","label":"ruby","ecosystem":"Alpine Linux","cpePart":null,"purl":"pkg:apk/alpine/ruby","purlType":"apk","versions":[{"text":"< 3.4.9-r0","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 3.4.9-r0","eol":null,"hubHref":null},{"vendor":"chainguard","product":"truffleruby","name":"truffleruby","label":"truffleruby","ecosystem":"Chainguard","cpePart":null,"purl":"pkg:apk/chainguard/truffleruby","purlType":"apk","versions":[{"text":"< 34.0.1-r0","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 34.0.1-r0","eol":null,"hubHref":null},{"vendor":"debian","product":"ruby3.1","name":"ruby3.1","label":"ruby3.1","ecosystem":"Debian","cpePart":null,"purl":"pkg:deb/debian/ruby3.1","purlType":"deb","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null}],"versionsText":"All versions (No fix recorded)","eol":null,"hubHref":null},{"vendor":"debian","product":"ruby3.3","name":"ruby3.3","label":"ruby3.3","ecosystem":"Debian","cpePart":null,"purl":"pkg:deb/debian/ruby3.3","purlType":"deb","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null}],"versionsText":"All versions (No fix recorded)","eol":null,"hubHref":null},{"vendor":"ubuntu","product":"jruby","name":"jruby","label":"jruby","ecosystem":"Ubuntu","cpePart":null,"purl":"pkg:deb/ubuntu/jruby","purlType":"deb","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null}],"versionsText":"All versions (No fix recorded)","eol":null,"hubHref":null},{"vendor":"ubuntu","product":"ruby2.3","name":"ruby2.3","label":"ruby2.3","ecosystem":"Ubuntu","cpePart":null,"purl":"pkg:deb/ubuntu/ruby2.3","purlType":"deb","versions":[{"text":"< 2.3.1-2~ubuntu16.04.16+esm15","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 2.3.1-2~ubuntu16.04.16+esm15","eol":null,"hubHref":null},{"vendor":"ubuntu","product":"ruby2.5","name":"ruby2.5","label":"ruby2.5","ecosystem":"Ubuntu","cpePart":null,"purl":"pkg:deb/ubuntu/ruby2.5","purlType":"deb","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null}],"versionsText":"All versions (No fix recorded)","eol":null,"hubHref":null},{"vendor":"ubuntu","product":"ruby2.7","name":"ruby2.7","label":"ruby2.7","ecosystem":"Ubuntu","cpePart":null,"purl":"pkg:deb/ubuntu/ruby2.7","purlType":"deb","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null}],"versionsText":"All versions (No fix recorded)","eol":null,"hubHref":null},{"vendor":"ubuntu","product":"ruby3.0","name":"ruby3.0","label":"ruby3.0","ecosystem":"Ubuntu","cpePart":null,"purl":"pkg:deb/ubuntu/ruby3.0","purlType":"deb","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null}],"versionsText":"All versions (No fix recorded)","eol":null,"hubHref":null},{"vendor":"ubuntu","product":"ruby3.2","name":"ruby3.2","label":"ruby3.2","ecosystem":"Ubuntu","cpePart":null,"purl":"pkg:deb/ubuntu/ruby3.2","purlType":"deb","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null}],"versionsText":"All versions (No fix recorded)","eol":null,"hubHref":null},{"vendor":"ubuntu","product":"ruby3.3","name":"ruby3.3","label":"ruby3.3","ecosystem":"Ubuntu","cpePart":null,"purl":"pkg:deb/ubuntu/ruby3.3","purlType":"deb","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null}],"versionsText":"All versions (No fix recorded)","eol":null,"hubHref":null},{"vendor":"RubyGems","product":"zlib","name":"zlib","label":"zlib","ecosystem":"RubyGems","cpePart":null,"purl":"pkg:gem/zlib","purlType":"gem","versions":[{"text":"≥ 3.2.0, < 3.2.3","noFixRecorded":false,"fixedIn":null},{"text":"≥ 3.1.0, < 3.1.2","noFixRecorded":false,"fixedIn":null},{"text":"< 3.0.1","noFixRecorded":false,"fixedIn":null}],"versionsText":"≥ 3.2.0, < 3.2.3 | ≥ 3.1.0, < 3.1.2 | < 3.0.1","eol":null,"hubHref":null},{"vendor":"ruby-lang","product":"zlib","name":"zlib","label":"zlib","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"< 3.0.1","noFixRecorded":false,"fixedIn":null},{"text":"≥ 3.1.0, < 3.1.2","noFixRecorded":false,"fixedIn":null},{"text":"≥ 3.2.0, < 3.2.3","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 3.0.1 | ≥ 3.1.0, < 3.1.2 | ≥ 3.2.0, < 3.2.3","eol":null,"hubHref":"/vendor/ruby-lang/zlib"},{"vendor":"ruby","product":"zlib","name":"zlib","label":"zlib","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"< 3.0.1","noFixRecorded":false,"fixedIn":null},{"text":"≥ 3.1.0, < 3.1.2","noFixRecorded":false,"fixedIn":null},{"text":"≥ 3.2.0, < 3.2.3","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 3.0.1 | ≥ 3.1.0, < 3.1.2 | ≥ 3.2.0, < 3.2.3","eol":null,"hubHref":"/vendor/ruby/zlib"}],"affectedCount":14,"eol":{"hasEol":false,"count":0},"references":[{"url":"https://github.com/ruby/zlib/security/advisories/GHSA-g857-hhfv-j68w","label":"github.com/ruby/zlib/security/advisories/GHSA-g857-hhfv-j68w","hostname":"github.com","tags":["X Refsource CONFIRM","REPORT","Advisory","WEB","Vendor Advisory"]},{"url":"https://hackerone.com/reports/3467067","label":"hackerone.com/reports/3467067","hostname":"hackerone.com","tags":["X Refsource MISC","WEB","Permissions Required"]},{"url":"https://security.alpinelinux.org/vuln/CVE-2026-27820","label":"security.alpinelinux.org/vuln/CVE-2026-27820","hostname":"security.alpinelinux.org","tags":["Advisory"]},{"url":"https://ubuntu.com/security/CVE-2026-27820","label":"ubuntu.com/security/CVE-2026-27820","hostname":"ubuntu.com","tags":["REPORT"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-27820","label":"www.cve.org/CVERecord?id=CVE-2026-27820","hostname":"www.cve.org","tags":["REPORT"]},{"url":"https://ubuntu.com/security/notices/USN-8556-1","label":"ubuntu.com/security/notices/USN-8556-1","hostname":"ubuntu.com","tags":["Advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2026-27820","label":"security-tracker.debian.org/tracker/CVE-2026-27820","hostname":"security-tracker.debian.org","tags":["Advisory"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/27xxx/CVE-2026-27820.json","label":"github.com/CVEProject/cvelistV5/tree/main/cves/2026/27xxx/CVE-2026-27820.json","hostname":"github.com","tags":["Advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-27820","label":"nvd.nist.gov/vuln/detail/CVE-2026-27820","hostname":"nvd.nist.gov","tags":["Advisory","Oval"]},{"url":"https://github.com/ruby/zlib","label":"github.com/ruby/zlib","hostname":"github.com","tags":["PACKAGE"]},{"url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/zlib/CVE-2026-27820.yml","label":"github.com/rubysec/ruby-advisory-db/blob/master/gems/zlib/CVE-2026-27820.yml","hostname":"github.com","tags":["WEB"]},{"url":"https://www.ruby-lang.org/en/news/2026/03/05/buffer-overflow-zlib-cve-2026-27820","label":"www.ruby-lang.org/en/news/2026/03/05/buffer-overflow-zlib-cve-2026-27820","hostname":"www.ruby-lang.org","tags":["WEB"]}],"lineage":{"upstream":[],"downstream":["OPENSUSE-SU-2026:21878-1","RHSA-2026:50728","RHSA-2026:50773","RHSA-2026:50778","RHSA-2026:50827","RHSA-2026:50828","RHSA-2026:7305","RHSA-2026:7307","RHSA-2026:8838","SUSE-SU-2026:1066-1","USN-8556-1"],"duplicates":[],"related":["CGA-6256-F6RW-C36P","OPENSUSE-SU-2026:21878-1","SUSE-SU-2026:1066-1","USN-8556-1"]},"timeline":[{"kind":"published","date":"2026-04-16T17:27:48.944Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2026-04-16T18:20:21.451Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"risk":{"score":70,"level":"high","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-20T07:27:06.148Z","stale":false,"partial":false}}