CVE-2026-43868: Apache Thrift: Rust implementation vulnerable to CVE-2020-13949 pattern

Published May 5, 2026
·
Updated

Affected versions of the thrift crate size a buffer directly from an attacker-controlled 4-byte length read off the wire, before reading any payload and with no upper bound, allowing a hostile peer to force a large eager allocation or an immediate abort (denial of service, CWE-400 / CWE-789). This is the Rust implementation's instance of the CVE-2020-13949 pattern, published by the Apache Thrift PMC as CVE-2026-43868.

Details

In TBinaryInputProtocol::readbytes (src/protocol/binary.rs), the length is read as a i32 from the transport and cast straight to usize to size a zeroing buffer before any payload is read:

rust fn readbytes(&mut self) -> crate::Result<Vec<u8>> { let numbytes = self.transport.readi32::<BigEndian>()? as usize; // length from the wire let mut buf = vec![0u8; numbytes]; // unbounded eager allocation self.transport.readexact(&mut buf).map(|| buf).maperr(From::from) }

There is no check that numbytes is non-negative or that it fits within the data actually available:

- A length of 0x7FFFFFFF forces a ~2 GiB allocation; 0x20000000 forces 512 MiB; and so on, from only a 4-byte input. - A negative length casts to a huge usize (up to usize::MAX), causing an immediate allocation failure / abort.

readstring routes through readbytes, so string fields are affected the same way. The sink is reachable from any peer sending binary-protocol data, so this is an unauthenticated, network-reachable denial of service.

The fix

From thrift 0.23.0 onward, readbytes goes through readbinarylen, which rejects negative sizes and enforces TConfiguration::maxstringsize (default 100 MiB), alongside default message, frame, and recursion limits.

A separate, related gap on the non-strict message-name path was published as CVE-2026-58389 and fixed in 0.24.0; this advisory covers the readbytes unbounded allocation (CVE-2026-43868), fixed in 0.23.0.

Other sources

Memory Allocation with Excessive Size Value vulnerability in Apache Thrift.

This issue affects Apache Thrift: before 0.23.0.

Users are recommended to upgrade to version 0.23.0, which fixes the issue.

— OSV

Memory Allocation with Excessive Size Value vulnerability in Apache Thrift.

This issue affects Apache Thrift: before 0.23.0.

Users are recommended to upgrade to version 0.23.0, which fixes the issue.

— Red Hat

Affected Software

6 affected componentsFixes available
Apache Thrift (Rust)<0.23.0
Apache Thrift<0.23.0
IBM Netezza Software<=11.3.0.3-IF2
bitnami/thrift<0.23.0
0.23.0
rust/thrift<0.23.0
0.23.0
rust/thrift>=0.0.0-0<0.23.0
0.23.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade bitnami/thrift to a version that resolves this vulnerability.

    Fixed in 0.23.0
  2. Upgrade

    Upgrade rust/thrift to a version that resolves this vulnerability.

    Fixed in 0.23.0
  3. Upgrade

    Upgrade thrift to a version that resolves this vulnerability.

    Fixed in 0.23.0

Event History

May 5, 2026
CVE Published
via MITRE·07:49 AM
Data Sourced
via MITRE·07:49 AM
DescriptionWeakness
Data Sourced
via OSV·07:49 AM
DescriptionSeverityWeakness
Data Sourced
via Red Hat·09:01 AM
DescriptionSeverityAffected Software
Data Sourced
via NVD·09:16 AM
DescriptionSeverityWeaknessAffected Software
Advisory Published
via OSV·09:31 AM
Data Sourced
via OSV·09:31 AM
Affected Software
Aug 20, 2026
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Frequently Asked Questions

1

What is the severity of CVE-2026-43868?

CVE-2026-43868 is classified as a vulnerability that can lead to memory allocation issues, posing potential risks to affected systems.

2

How do I fix CVE-2026-43868?

To fix CVE-2026-43868, users should upgrade to Apache Thrift version 0.23.0 or later.

3

What versions of Apache Thrift are affected by CVE-2026-43868?

CVE-2026-43868 affects Apache Thrift versions prior to 0.23.0.

4

What is the nature of the issue in CVE-2026-43868?

CVE-2026-43868 involves a pattern memory allocation vulnerability that can be exploited with excessive size values.

5

Is there a workaround for CVE-2026-43868?

There are no known workarounds for CVE-2026-43868; upgrading to the fixed version is recommended.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203