CVE-2026-91135: Apache Thrift: C++ `THeaderTransport::transform()` heap buffer overflow (write direction)
Heap-based buffer overflow vulnerability in Apache Thrift C++ THeaderTransport.
When an application enables the ZLIB transform for the frames it sends, THeaderTransport::transform() copies the compressed frame into the write buffer without making sure it fits. Data that does not compress, such as content a remote peer supplied, grows under compression, so the copy writes past the end of the heap buffer by an amount that grows with the size of the frame, and for large frames it also reads past the end of the transform buffer.
This issue affects Apache Thrift: before 0.25.0.
Users are recommended to upgrade to version 0.25.0, which fixes the issue.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
Apache Thriftto a version that resolves this vulnerability.Fixed in 0.25.0
Event History
Frequently Asked Questions
Which deployments are exposed to this issue?
Apache Thrift versions before 0.25.0 are affected when an application uses the C++ THeaderTransport and enables the ZLIB transform for outbound frames. The described overflow occurs in the write direction.
What input conditions can trigger the overflow?
The application must send data through the enabled ZLIB transform that does not compress well and therefore expands during compression. The description specifically notes that this can include content supplied by a remote peer, and the overwrite size grows with the frame size.
Is the ZLIB transform required for exploitation?
Yes. The issue is described as occurring when the application enables the ZLIB transform for frames it sends; no impact is stated for configurations where that transform is not enabled.
What is the recommended remediation?
Upgrade Apache Thrift to version 0.25.0, which fixes the issue. If an immediate upgrade is not possible, the available information indicates that disabling the outbound ZLIB transform would remove the described triggering condition.