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

> An integer overflow in the Rust bytes library allows attackers to trigger out-of-bounds memory access, potentially leading to code execution or crashes.

- **Severity:** Medium 5.5 (`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`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 4 Feb 2026
- **Updated:** 5 Feb 2026
- **Also known as:** AZL-76691, AZL-76703, AZL-76712, AZL-76715, AZL-76718, AZL-76721, AZL-76752, AZL-78615, AZL-85059, CLEANSTART-2026-OG35217, CLEANSTART-2026-WJ40608, DEBIAN-CVE-2026-25541, GHSA-434x-w66g-qw3r, MINI-36q8-j2fj-6wvq, MINI-68w3-q773-j52h, MINI-7g6p-q8hc-m23f, MINI-8vxc-wg98-j2gp, MINI-97cp-2wx6-h9v2, MINI-cc89-xfwq-qg7w, MINI-cqrm-88vx-8j76, MINI-cw3f-949x-fr7w, MINI-ff4f-4r5m-8jr6, MINI-gvcj-x3wf-q444, MINI-h65q-r93f-mmfw, MINI-hxwc-w2h2-rjwr, MINI-m9mr-76gq-mchx, MINI-mxxv-5775-hvp8, MINI-p6cv-wgx6-hg57, MINI-qhxm-mhfp-6j2q, MINI-r6gg-rp2r-2hcq, MINI-vhcw-383c-pfhv, MINI-vvc4-h6jg-3fjf, MINI-wjpj-cwm4-w62j, RUSTSEC-2026-0007, SUSE-SU-2026:22935-1, UBUNTU-CVE-2026-25541, openSUSE-RU-2026:21658-1, openSUSE-SU-2026:11280-1, openSUSE-SU-2026:11482-1, openSUSE-SU-2026:11495-1, openSUSE-SU-2026:11512-1, openSUSE-SU-2026:11513-1, openSUSE-SU-2026:11522-1, openSUSE-SU-2026:11525-1, openSUSE-SU-2026:11528-1, openSUSE-SU-2026:11529-1, openSUSE-SU-2026:11549-1, openSUSE-SU-2026:11655-1, openSUSE-SU-2026:11835-1, openSUSE-SU-2026:11905-1, openSUSE-SU-2026:12205-1, openSUSE-SU-2026:21428-1, openSUSE-SU-2026:21794-1, openSUSE-SU-2026:21815-1

## What is CVE-2026-25541?

CVE-2026-25541 is a medium-severity vulnerability in tokio-rs bytes, published on 4 Feb 2026. It can only be exploited from the same machine or local network, with no action from the victim.

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

Weakness: CWE-680 (Integer Overflow to Buffer Overflow)

## Which versions are affected by CVE-2026-25541?

3 open source packages ship an affected version, including bytes. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `bytes` | crates.io | From 1.2.1 | 1.11.1 |
| `bytes` | crates.io | From 1.2.1 | 1.11.1 |
| `bytes` | crates.io | From 1.2.1 | 1.11.1 |
| `nm-configurator` | SUSE:Linux Micro 6.2 | All versions | 0.3.5-160000.1.1 |
| `nm-configurator` | openSUSE:Leap 16.0 | All versions | 0.3.5-160000.1.1 |
| `sequoia-sq` | openSUSE:Leap 16.0 | All versions | 1.4.0-bp160.1.1 |
| `supergfxctl` | openSUSE:Leap 16.0 | All versions | 1762634235.5d503b1-bp160.1.1 |
| `waylyrics` | openSUSE:Leap 16.0 | All versions | 0.4.0-bp160.1.1 |
| `cargo-audit` | openSUSE:Tumbleweed | All versions | 0.22.2~git0.281452c-2.1 |
| `cargo-c` | openSUSE:Tumbleweed | All versions | 0.10.23-2.1 |
| `forgejo-cli` | openSUSE:Tumbleweed | All versions | 0.6.0-2.1 |
| `git-cliff` | openSUSE:Tumbleweed | All versions | 2.13.1-1.1 |
| `librepods` | openSUSE:Tumbleweed | All versions | 0.1.0+git20260515.672e65a-1.1 |
| `markdown-oxide` | openSUSE:Tumbleweed | All versions | 0.25.12-1.1 |
| `nm-configurator` | openSUSE:Tumbleweed | All versions | 0.3.5-2.1 |
| `obs-service-cargo` | openSUSE:Tumbleweed | All versions | 7.2.2-2.1 |
| `rustup` | openSUSE:Tumbleweed | All versions | 1.29.0~0-1.1 |
| `switcheroo` | openSUSE:Tumbleweed | All versions | 2.6.0-1.1 |
| `tealdeer` | openSUSE:Tumbleweed | All versions | 1.8.0-2.1 |
| `tree-sitter` | openSUSE:Tumbleweed | All versions | 0.26.8-5.1 |
| `wasm-bindgen` | openSUSE:Tumbleweed | All versions | 0.2.100-2.1 |
| `wild` | openSUSE:Tumbleweed | All versions | 0.10.0-2.1 |

Products: Tokio-Rs Bytes.

## How do I fix CVE-2026-25541?

Upgrade bytes to 1.11.1 or later.

## Is CVE-2026-25541 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-25541 exists.

Public exploit code:

- CVE-2026-25541 impact analysis for Fuel infrastructure (bytes crate integer overflow) (github_poc): https://github.com/trajanOx/cve-2026-25541-fuel-analysis

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-25541 and fix it if it is affected.

What it is: CVE-2026-25541 is a medium-severity vulnerability in tokio-rs bytes, published on 4 Feb 2026. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-25541 exists.

Affected packages and fixed versions:
- bytes (crates.io): affected from 1.2.1; fixed in 1.11.1
- bytes (crates.io): affected from 1.2.1; fixed in 1.11.1
- bytes (crates.io): affected from 1.2.1; fixed in 1.11.1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-25541/ (Markdown: https://insights.sbomify.com/CVE-2026-25541/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-25541
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-25541
- OSV: https://osv.dev/vulnerability/CVE-2026-25541

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-25541/
Summaries are generated and may contain mistakes; the official description above is the record.
