CVE-2026-25541
CVE-2026-25541 is a high-severity vulnerability in Tokio-rs Bytes with a CVSS 3.x base score of 7.5. It is not currently listed as actively exploited by CISA, and its EPSS exploit-prediction score is low. The underlying weakness is classified as CWE-680.
Key facts
- Severity: High (CVSS 3.x base score 7.5)
- CVSS v4: 5.5
- EPSS exploit prediction: 1% (43rd percentile)
- Actively exploited: Not listed in CISA KEV
- EU (EUVD) id: EUVD-2026-5321
- Weakness: CWE-680
- Affected product: Tokio-rs Bytes
- Published:
- Last modified:
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.
Frequently asked questions
- What is CVE-2026-25541?
- 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.
- How severe is CVE-2026-25541?
- CVE-2026-25541 has a CVSS 3.x base score of 7.5, rated high severity. It is exploitable over network with low attack complexity, requires no privileges and no user interaction. Impact on confidentiality is none, integrity none, and availability high.
- Is CVE-2026-25541 being actively exploited?
- It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 1% (43rd percentile), an estimate of the probability of exploitation in the next 30 days.
- What products are affected by CVE-2026-25541?
- CVE-2026-25541 affects Tokio-rs Bytes. See the affected-products list for the exact vulnerable versions.
- How do I fix CVE-2026-25541?
- Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround. Given its high severity, prioritise patching exposed systems.
- Does CVE-2026-25541 have an EU (EUVD) identifier?
- Yes. CVE-2026-25541 is tracked in the ENISA EU Vulnerability Database (EUVD) as EUVD-2026-5321.
- When was CVE-2026-25541 published?
- CVE-2026-25541 was published on 2026-02-04 and last updated on 2026-06-17.
References
- https://github.com/tokio-rs/bytes/commit/d0293b0e35838123c51ca5dfdf468ecafee4398f
- https://github.com/tokio-rs/bytes/releases/tag/v1.11.1
- https://github.com/tokio-rs/bytes/security/advisories/GHSA-434x-w66g-qw3r
- https://rustsec.org/advisories/RUSTSEC-2026-0007.html
Affected products (1)
- cpe:2.3:a:tokio-rs:bytes:*:*:*:*:*:rust:*:*
Other CWE-680 vulnerabilities
- CVE-2026-8376 — Critical (CVSS 9.8): Perl versions through 5.43.10 have a heap buffer overflow when compiling regular expressions with a repeated fixed…
- CVE-2025-54952 — Critical (CVSS 9.8): An integer overflow vulnerability in the loading of ExecuTorch models can cause smaller-than-expected memory regions to…
- CVE-2024-33078 — Critical (CVSS 9.8): Tencent Libpag v4.3 is vulnerable to Buffer Overflow. A user can send a crafted image to trigger a overflow leading to…
- CVE-2025-53510 — High (CVSS 8.8): A memory corruption vulnerability exists in the PSD Image Decoding functionality of the SAIL Image Decoding Library…
- CVE-2025-52930 — High (CVSS 8.8): A memory corruption vulnerability exists in the BMPv3 RLE Decoding functionality of the SAIL Image Decoding Library…
- CVE-2025-52456 — High (CVSS 8.8): A memory corruption vulnerability exists in the WebP Image Decoding functionality of the SAIL Image Decoding Library…