CVEfocus › CVE database › CVE-2026-25541

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

CVSS 5.5 MediumEPSS 0.6% (higher than 46% of CVEs)Published 2026-02-04Updated 2026-02-05Assigner: GitHub_M

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.

CWE-680

What to do

Fixed builds are available from Debian, crates.io: see the table below for the fixed version per release.

Debian, Ubuntu have not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

2Fixed
3Fix pending
3Under investigation
1Will not fix

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.04rust-bytesUnder investigationUBUNTU-CVE-2026-25541
Ubuntu 25.10rust-bytesWill not fix
Ubuntu decided not to fix this in this release
UBUNTU-CVE-2026-25541
Ubuntu 24.04rust-bytesUnder investigationUBUNTU-CVE-2026-25541
Ubuntu 22.04rust-bytesUnder investigationUBUNTU-CVE-2026-25541
Ubuntu 20.04rust-bytesFix pendingUBUNTU-CVE-2026-25541
Debian 14rust-bytesFixed1.11.1-1DEBIAN-CVE-2026-25541
Debian 13rust-bytesFix pendingDEBIAN-CVE-2026-25541
Debian 12rust-bytesFix pendingDEBIAN-CVE-2026-25541
crates.io librarybytesFixed1.11.1GHSA-434x-w66g-qw3r

What the vendor says

As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.