CVE-2026-25541
Bytes is vulnerable to integer overflow in BytesMut::reserve
Description
Bytes is a utility library for working with bytes. From version 1.2.1 to before 1.11.1, Bytes is vulnerable to integer overflow in BytesMut::reserve. In the unique reclaim path of BytesMut::reserve, if the condition "v_capacity >= new_cap + offset" uses an unchecked addition. When new_cap + offset overflows usize in release builds, this condition may incorrectly pass, causing self.cap to be set to a value that exceeds the actual allocated capacity. Subsequent APIs such as spare_capacity_mut() then trust this corrupted cap value and may create out-of-bounds slices, leading to UB. This behavior is observable in release builds (integer overflow wraps), whereas debug builds panic due to overflow checks. This issue has been patched in version 1.11.1.
INFO
Published Date :
Feb. 4, 2026, 10:16 p.m.
Last Modified :
Feb. 27, 2026, 8:13 p.m.
Remotely Exploit :
Yes !
Source :
[email protected]
CVSS Scores
| Score | Version | Severity | Vector | Exploitability Score | Impact Score | Source |
|---|---|---|---|---|---|---|
| CVSS 3.1 | HIGH | [email protected] | ||||
| CVSS 4.0 | MEDIUM | [email protected] |
Solution
- Update Bytes library to version 1.11.1 or later.
- Review integer overflow handling in custom code.
- Ensure capacity checks prevent out-of-bounds access.
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2026-25541.
| URL | Resource |
|---|---|
| https://github.com/tokio-rs/bytes/commit/d0293b0e35838123c51ca5dfdf468ecafee4398f | Patch |
| https://github.com/tokio-rs/bytes/releases/tag/v1.11.1 | Product Release Notes |
| https://github.com/tokio-rs/bytes/security/advisories/GHSA-434x-w66g-qw3r | Exploit Vendor Advisory |
| https://rustsec.org/advisories/RUSTSEC-2026-0007.html | Exploit Third Party Advisory |
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2026-25541 is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2026-25541
weaknesses.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2026-25541 vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2026-25541 vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
Initial Analysis by [email protected]
Feb. 27, 2026
Action Type Old Value New Value Added CVSS V3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H Added CPE Configuration OR *cpe:2.3:a:tokio-rs:bytes:*:*:*:*:*:rust:*:* versions from (including) 1.2.1 up to (excluding) 1.11.1 Added Reference Type GitHub, Inc.: https://github.com/tokio-rs/bytes/commit/d0293b0e35838123c51ca5dfdf468ecafee4398f Types: Patch Added Reference Type GitHub, Inc.: https://github.com/tokio-rs/bytes/releases/tag/v1.11.1 Types: Product, Release Notes Added Reference Type GitHub, Inc.: https://github.com/tokio-rs/bytes/security/advisories/GHSA-434x-w66g-qw3r Types: Exploit, Vendor Advisory Added Reference Type GitHub, Inc.: https://rustsec.org/advisories/RUSTSEC-2026-0007.html Types: Exploit, Third Party Advisory -
New CVE Received by [email protected]
Feb. 04, 2026
Action Type Old Value New Value Added Description Bytes is a utility library for working with bytes. From version 1.2.1 to before 1.11.1, Bytes is vulnerable to integer overflow in BytesMut::reserve. In the unique reclaim path of BytesMut::reserve, if the condition "v_capacity >= new_cap + offset" uses an unchecked addition. When new_cap + offset overflows usize in release builds, this condition may incorrectly pass, causing self.cap to be set to a value that exceeds the actual allocated capacity. Subsequent APIs such as spare_capacity_mut() then trust this corrupted cap value and may create out-of-bounds slices, leading to UB. This behavior is observable in release builds (integer overflow wraps), whereas debug builds panic due to overflow checks. This issue has been patched in version 1.11.1. Added CVSS V4.0 AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:P/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X Added CWE CWE-680 Added Reference https://github.com/tokio-rs/bytes/commit/d0293b0e35838123c51ca5dfdf468ecafee4398f Added Reference https://github.com/tokio-rs/bytes/releases/tag/v1.11.1 Added Reference https://github.com/tokio-rs/bytes/security/advisories/GHSA-434x-w66g-qw3r Added Reference https://rustsec.org/advisories/RUSTSEC-2026-0007.html