Intel

AIKIDO-2026-993409

thrift is vulnerable to Heap-based Buffer Overflow

Heap-based Buffer OverflowCVE-2026-91135 Published 5 days ago

92

Critical Risk

This Affects:

C++thrift
0.10.0 - 0.24.0
Fixed in 0.25.0
Are you affected? Scan for Free

TL;DR

THeaderTransport::transform() compresses outgoing frames when the ZLIB transform is enabled. resizeTransformBuffer() allocates only wBufSize_ plus a fixed DEFAULT_BUFFER_SIZE margin and does not grow further once that size is reached, so the retry loop cannot enlarge the buffer. The method then copies stream.total_out bytes from the transform buffer back into the write buffer without checking that the compressed length fits. A frame that does not compress well, including data a remote peer supplied, can make the compressed output exceed that margin. The copy writes past the end of the heap write buffer, and for a large frame it also reads past the end of the transform buffer. The fix sizes the transform buffer with deflateBound() plus the existing headroom, compresses in a single pass, and grows the write buffer to the compressed length before copying the result back.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and a C++ client or server enables the THeaderTransport ZLIB transform for frames that contain attacker-influenced or incompressible data.

Background info

thrift is vulnerable to Heap-based Buffer Overflow in versions 0.10.0 - 0.24.0.

How to fix this

Upgrade the thrift library to the patch version.

Are You Affected?

Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.

Free. No credit card required.

Aikido Platform