CVE-2026-25541: Bytes - Integer Overflow
- Cve: CVE-2026-25541
- Name: Bytes - Integer Overflow
- 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.
- Impact: Attackers can cause out-of-bounds memory access leading to undefined behavior and potential memory corruption.
- Remediation: Update to version 1.11.1 or later.
- Vulnerability type: integer_overflow
- Requirement type: none
- Labels source: projectdiscovery
- Severity: high
- Cvss score: 7.5
- Cvss vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- Epss score: 0.00601
- Epss percentile: 0.49716
- Assignee: [email protected]
- Published at: 2026-02-04T22:16:00Z
- Age in days: 293
- Modified at: 2026-06-17T10:24:49Z
- Patch available: yes
- Public exploits total: 3
- References total: 4
- Products total: 1
- Oss: yes
- Projects total: 1
- Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2026-25541
- Nvd status: analyzed
- Checked, none or zero: vulnerability impact, known exploited entries, nuclei templates, public exploits capped, rejected by nvd
- Not known: requirements, hackerone
Cwe
| Id | Name |
|---|---|
| CWE-680 | Integer Overflow to Buffer Overflow |
Public exploits
| Url | Source | Added date |
|---|---|---|
| https://github.com/tokio-rs/bytes/security/advisories/GHSA-434x-w66g-qw3r | nvd | 2026-02-04 |
| https://rustsec.org/advisories/RUSTSEC-2026-0007.html | nvd | 2026-02-04 |
| https://github.com/trajanOx/cve-2026-25541-fuel-analysis | poc-in-github | 2026-06-22 |
References
Same in every row:
- Source: nvd
| Url | Tags |
|---|---|
| https://github.com/tokio-rs/bytes/commit/d0293b0e35838123c51ca5dfdf468ecafee4398f | Patch |
| 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 |
| https://github.com/tokio-rs/bytes/releases/tag/v1.11.1 | Product, Release Notes |
Products
| Product | Affected | Platform bound | Sources | Url |
|---|---|---|---|---|
| tokio-rs:bytes | >= 1.2.1, < 1.11.1 | no | nvd | /v1/products/tokio-rs/bytes |
Projects
| Repository | Link kinds | Indexed | Url |
|---|---|---|---|
| tokio-rs/bytes | commit, fix, package, releases, security_advisory | yes | /v1/repositories/tokio-rs/bytes |
Index
- Repositories: 604
- Repositories high signal: 423
- Packages: 1
Exploitation
- Public exploit: yes
- Public exploit count: 3
- Public exploit first date: 2026-02-04
- Remote: yes
- Checked, none or zero: known exploited, known exploited by, exploitation seen, initial access, authentication required
- Not known: known exploited since, vulncheck known exploited since, nuclei template, initial access since, hackerone reports, exposed hosts