# CVE-2026-25541: Bytes is vulnerable to integer overflow in BytesMut::reserve

- Severity: Medium 5.5 (CVSS:4.0, scored by GitHub_M) `CVSS:4.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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.60%, higher than 50% of CVEs (2026-12-01)
- Public exploit code or proof of concept: 2 links below, marked "exploit"
- Published: 2026-02-03T12:00:00.000Z
- Modified: 2026-10-12T18:00:09.239Z
- Also known as: GHSA-434x-w66g-qw3r, RUSTSEC-2026-0007
- Weaknesses: CWE-680
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- tokio-rs bytes: >= 1.2.1, < 1.11.1; from 1.2.1 before 1.11.1
- bytes (crates.io): from 1.2.1 before 1.11.1

## Every score

- GitHub_M: CVSS:4.0 5.5 Medium `CVSS:4.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`
- GitHub: CVSS:4.0 Medium `CVSS:4.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`
- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://github.com/tokio-rs/bytes/security/advisories/GHSA-434x-w66g-qw3r> (exploit, vendor-advisory, web)
- <https://rustsec.org/advisories/RUSTSEC-2026-0007.html> (exploit, advisory, third-party-advisory, web)
- <https://github.com/tokio-rs/bytes/commit/d0293b0e35838123c51ca5dfdf468ecafee4398f> (patch, web)
- <https://github.com/tokio-rs/bytes/releases/tag/v1.11.1> (product, release-notes, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-25541> (advisory)
- <https://github.com/tokio-rs/bytes> (package)
- <https://crates.io/crates/bytes> (package)

## Sources

- CVE List: [CVE-2026-25541](https://www.cve.org/CVERecord?id=CVE-2026-25541), CVE Terms of Use, modified 2026-02-05
- GitHub Advisory Database: [GHSA-434x-w66g-qw3r](https://github.com/advisories/GHSA-434x-w66g-qw3r), CC-BY-4.0, modified 2026-09-10
- RustSec Advisory Database: [RUSTSEC-2026-0007](https://rustsec.org/advisories/RUSTSEC-2026-0007.html), CC0-1.0, modified 2026-10-12
- NVD: [CVE-2026-25541](https://nvd.nist.gov/vuln/detail/CVE-2026-25541), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2026-25541 · Whole record: https://cve.day/CVE-2026-25541.json · Rebuilt by cve.day 2026-11-25T22:59:13.513Z
