
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-27820 is a buffer overflow vulnerability in the Ruby zlib gem's Zlib::GzipReader component, specifically in the zstream_buffer_ungets function. The function prepends caller-provided bytes ahead of previously produced output without ensuring the backing Ruby string has sufficient capacity before the memmove operation, leading to memory corruption when the buffer length exceeds capacity. Affected versions include zlib gem 3.0.0 and below, 3.1.0–3.1.1, and 3.2.0–3.2.1; fixed versions are 3.0.1, 3.1.2, and 3.2.3. The vulnerability was publicly disclosed on March 5, 2026, and published to the GitHub Advisory Database on April 16, 2026. CVSS v3.1 base score is 9.8 (Critical) per Red Hat, while the GitHub Advisory rates it Moderate (5.9 CVSS v4) (Github Advisory, Red Hat Bugzilla, Ruby Advisory).
The root cause is classified as CWE-120 (Buffer Copy without Checking Size of Input / Classic Buffer Overflow) and CWE-131 (Incorrect Calculation of Buffer Size). The vulnerable function zstream_buffer_ungets in the Ruby zlib gem performs a memmove to shift existing buffered data in order to prepend caller-supplied bytes, but does not first verify or expand the backing Ruby string's allocated capacity. When an attacker supplies sufficiently large input (e.g., via Zlib::GzipReader#ungetc), the buffer length can exceed the string's capacity, resulting in an out-of-bounds write and memory corruption. The upstream fix is available as commit 608d2be66fcbcb759cbe26c82e95f4381b8dd140 in the ruby/zlib repository. The vulnerability was originally reported via HackerOne report #3467067 by researcher calysteon (Github Advisory, Red Hat Bugzilla).
Successful exploitation can result in memory corruption, which may lead to application crashes (denial of service), and potentially arbitrary code execution depending on how the affected zlib gem is used within the application. The vulnerability affects confidentiality, integrity, and availability of the vulnerable system, as memory corruption can be leveraged to overwrite adjacent memory structures. In practice, the most likely immediate impact is application instability or crash; more severe exploitation (e.g., code execution) would depend on application-specific memory layout and usage context (Github Advisory, Ruby Advisory).
There is no public proof-of-concept exploit code and no evidence of in-the-wild exploitation as of the time of reporting (Github Advisory). The EPSS score is approximately 0.017% (4th percentile), indicating a very low probability of exploitation in the near term. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. No threat actor attribution has been reported. The vulnerability was discovered and reported through HackerOne's responsible disclosure program by researcher calysteon (Github Advisory).
Update the Ruby zlib gem to a patched version immediately using gem update zlib. The fixed versions are: 3.0.1 (for Ruby 3.2 users on zlib ≤ 3.0.0), 3.1.2 (for Ruby 3.3 users on zlib 3.1.0–3.1.1), and 3.2.3 (for all users on zlib 3.2.0–3.2.1, or as the general recommendation). Bundler users should add gem "zlib", ">= 3.2.3" to their Gemfile. No configuration-based workaround is available; patching is the only remediation. Monitor applications for unexpected crashes or availability issues that may indicate exploitation attempts (Github Advisory, Ruby Advisory).
The Ruby security team published an official advisory on March 5, 2026, and coordinated patched Ruby releases (3.4.9 on March 11, 3.3.11 on March 26, and 3.2.11 on March 27, 2026) that bundle the fixed zlib gem. Downstream projects such as Fluent Package (v6.0.3) and Puppet Core (8.18.0, 8.19.0) issued updates referencing this CVE. Community discussion was limited, with some social media mentions and aggregator coverage, but no significant controversy or widespread alarm given the low exploitation probability (Ruby Advisory, Github Advisory).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."