CVE-2026-43868: Unbounded memory allocation in `thrift` binary protocol `read_bytes`
Published 2026-11-02 · Updated 2026-11-02 · Also known as BIT-thrift-2026-43868, GHSA-2f9f-gq7v-9h6m, RUSTSEC-2026-0435
Summary
The thrift crate contains an unbounded memory allocation vulnerability in its binary protocol handler that allows remote attackers to trigger denial-of-service conditions. Developers using this crate should update to version 0.23.0 or later to implement necessary length validation.
Who is affected
Affected deployments are those utilizing the TBinaryInputProtocol in the thrift Rust crate to parse network data from untrusted peers. An attacker can supply a malicious 4-byte length prefix to force an immediate, massive memory allocation, leading to process termination via an allocation failure or resource exhaustion.
Exploitability
The vulnerability is highly exploitable as it requires no authentication and can be triggered remotely via simple network-delivered binary data. While the EPSS score of 0.007 suggests moderate interest, the CVSS 3.1 score of 7.5 reflects a high potential for service disruption, and it is not currently listed as a CISA Known Exploited Vulnerability.
Remediation
- Upgrade the thrift crate to version 0.23.0 or later.
- Ensure TConfiguration limits, such as max_string_size, are appropriately tuned after upgrading.
How to check your project
- Inspect Cargo.lock for entries of the thrift crate with versions prior to 0.23.0.
- Run 'cargo tree --package thrift' to identify the exact version utilized by the project dependency graph.
Automated analysis of the published advisory data, generated 2026-11-18. Not human-reviewed; verify against the official advisory. How this works.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | Upgrade |
|---|---|---|---|---|
| crates.io | thrift |
>= 0.0.0-0, < 0.23.0 | 0.23.0 | cargo update -p thrift --precise 0.23.0 |
CVSS 3.1 vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
| Attack vector | Network |
|---|---|
| Attack complexity | Low |
| Privileges required | None |
| User interaction | None |
| Scope | Unchanged |
| Confidentiality | None |
| Integrity | None |
| Availability | High |
FAQ
What specifically triggers this vulnerability?
The vulnerability is triggered when the TBinaryInputProtocol::read_bytes method reads a 4-byte integer from the transport and uses it to pre-allocate a Vec<u8> without validating the size against available resources.
Does this impact string handling?
Yes, the read_string method is also affected because it routes through read_bytes, meaning string fields are subject to the same unbounded allocation flaw.
Is there a difference between this and CVE-2026-58389?
Yes, this advisory covers the primary read_bytes unbounded allocation flaw fixed in 0.23.0, whereas CVE-2026-58389 refers to a separate, related gap in the non-strict message-name path fixed in 0.24.0.
Original advisory description
References
- PACKAGE https://crates.io/crates/thrift
- ADVISORY https://rustsec.org/advisories/RUSTSEC-2026-0435.html
- WEB https://lists.apache.org/thread/zj76dtwnbbs1m7z3focf4wd51pqpsmn9
Source records: RUSTSEC-2026-0435 (OSV.dev) · EPSS by FIRST, 2026-11-26.