Intel

AIKIDO-2026-10288

zlib is vulnerable to Buffer Overflow

Buffer OverflowCVE-2026-27820 Published Mar 5, 2026

80

High Risk

This Affects:

RUBYzlib
0.0.1 - 3.0.0
Fixed in 3.0.1
3.1.0 - 3.1.1
Fixed in 3.1.2
3.2.0 - 3.2.2
Fixed in 3.2.3
Are you affected? Scan for Free

TL;DR

Affected versions of the zlib gem are vulnerable to a buffer overflow in Zlib::GzipReader. The zstream_buffer_ungets function prepends caller-provided bytes to an existing output buffer but does not ensure that the underlying Ruby string has sufficient capacity before shifting existing data with memmove. This can lead to a buffer overflow and memory corruption when the buffer length exceeds its allocated capacity.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range.

Background info

zlib is vulnerable to Buffer Overflow in versions 0.0.1 - 3.0.0, 3.1.0 - 3.1.1 and 3.2.0 - 3.2.2.

How to fix this

Upgrade the zlib library to the patch version.