p PatchFirst

CVE-2026-25541

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

CVSS 5.5 · Medium · EPSS 0.6% · Fix available

Compare with your installed version

Affected products and known fixed versions are public information. Compare them with your installed version.

Check the installed version:

dpkg-query -W -f='${source:Package} ${binary:Package} ${Version}\n' | awk '$1=="rust-bytes"'

Assess your server’s risks

The free check gives you a rating and a risk summary by technology stack, without signing up. It does not answer whether this particular vulnerability affects you.

Monitoring matches public information against your servers’ software. Detailed findings for your servers include the order of updates.

curl -fsSL https://patchfirst.dev/check.sh | sh
Check your server for free →

Channels carry general technology news; monitoring reports new findings on your servers in your dashboard, through browser notifications, in Telegram or via a webhook.

This page contains facts from public vulnerability sources. Check the original advisory before updating.

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.

Published
Updated

Fixes in distributions

Stack: system

Affected products and versions

  • bytes

    Versions
    • >= 1.2.1, < 1.11.1: Affected

    No fix published

  • rust-bytes Debian 12

    Versions
    • 1.10.1-1
    • 1.11.0-1
    • 1.11.1-1
    • 1.12.1-1
    • 1.2.1-1
    • 1.4.0-1
    All versions (10)
    • 1.5.0-1
    • 1.7.2-1
    • 1.8.0-1
    • 1.9.0-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • rust-bytes Debian 13

    Versions
    • 1.10.1-1
    • 1.11.0-1
    • 1.11.1-1
    • 1.12.1-1
    • 1.9.0-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • rust-bytes Debian 14

    Versions
    • 1.10.1-1
    • 1.11.0-1
    • 1.9.0-1
    Affected ranges
    • ECOSYSTEM: < 1.11.1-1

    Update to 1.11.1-1

  • rust-bytes Ubuntu 20.04 LTS

    Versions
    • 0.4.12-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • rust-bytes Ubuntu 22.04 LTS

    Versions
    • 0.4.12-1
    • 1.1.0-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • rust-bytes Ubuntu 24.04 LTS

    Versions
    • 1.4.0-1
    • 1.5.0-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • rust-bytes Ubuntu 25.10

    Versions
    • 1.9.0-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • rust-bytes Ubuntu 26.04 LTS

    Versions
    • 1.9.0-1
    • 1.10.1-1
    • 1.11.0-1
    • 1.11.1-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

Original sources

Check your server →