Search

Find a vulnerability

Search criteria

    3 vulnerabilities found for bytes by tokio-rs

    FKIE_CVE-2026-25541

    Vulnerability from fkie_nvd - Published: 2026-02-04 22:16 - Updated: 2026-06-17 10:24
    Summary
    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.
    Impacted products
    Vendor Product Version
    tokio-rs bytes *

    {
      "affected": [
        {
          "affectedData": [
            {
              "product": "bytes",
              "vendor": "tokio-rs",
              "versions": [
                {
                  "status": "affected",
                  "version": "\u003e= 1.2.1, \u003c 1.11.1"
                }
              ]
            }
          ],
          "source": "security-advisories@github.com"
        }
      ],
      "configurations": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:a:tokio-rs:bytes:*:*:*:*:*:rust:*:*",
                  "matchCriteriaId": "20BFEB88-98B3-498A-9FFC-0C950ED8CF0D",
                  "versionEndExcluding": "1.11.1",
                  "versionStartIncluding": "1.2.1",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "cveTags": [],
      "descriptions": [
        {
          "lang": "en",
          "value": "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 \u003e= 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."
        },
        {
          "lang": "es",
          "value": "Bytes es una librer\u00eda de utilidad para trabajar con bytes. Desde la versi\u00f3n 1.2.1 hasta antes de la 1.11.1, Bytes es vulnerable a desbordamiento de entero en BytesMut::reserve. En la ruta de recuperaci\u00f3n \u00fanica de BytesMut::reserve, si la condici\u00f3n \u0027v_capacity \u0026gt;= new_cap + offset\u0027 utiliza una adici\u00f3n sin verificar. Cuando new_cap + offset desborda usize en compilaciones de lanzamiento, esta condici\u00f3n puede pasar incorrectamente, haciendo que self.cap se establezca en un valor que excede la capacidad asignada real. Las API posteriores, como spare_capacity_mut(), conf\u00edan entonces en este valor de cap corrupto y pueden crear segmentos fuera de l\u00edmites, lo que lleva a UB. Este comportamiento es observable en compilaciones de lanzamiento (el desbordamiento de entero se ajusta), mientras que las compilaciones de depuraci\u00f3n entran en p\u00e1nico debido a las comprobaciones de desbordamiento. Este problema ha sido parcheado en la versi\u00f3n 1.11.1."
        }
      ],
      "id": "CVE-2026-25541",
      "lastModified": "2026-06-17T10:24:49.410",
      "metrics": {
        "cvssMetricV31": [
          {
            "cvssData": {
              "attackComplexity": "LOW",
              "attackVector": "NETWORK",
              "availabilityImpact": "HIGH",
              "baseScore": 7.5,
              "baseSeverity": "HIGH",
              "confidentialityImpact": "NONE",
              "integrityImpact": "NONE",
              "privilegesRequired": "NONE",
              "scope": "UNCHANGED",
              "userInteraction": "NONE",
              "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
              "version": "3.1"
            },
            "exploitabilityScore": 3.9,
            "impactScore": 3.6,
            "source": "nvd@nist.gov",
            "type": "Primary"
          }
        ],
        "cvssMetricV40": [
          {
            "cvssData": {
              "Automatable": "NOT_DEFINED",
              "Recovery": "NOT_DEFINED",
              "Safety": "NOT_DEFINED",
              "attackComplexity": "LOW",
              "attackRequirements": "NONE",
              "attackVector": "LOCAL",
              "availabilityRequirement": "NOT_DEFINED",
              "baseScore": 5.5,
              "baseSeverity": "MEDIUM",
              "confidentialityRequirement": "NOT_DEFINED",
              "exploitMaturity": "PROOF_OF_CONCEPT",
              "integrityRequirement": "NOT_DEFINED",
              "modifiedAttackComplexity": "NOT_DEFINED",
              "modifiedAttackRequirements": "NOT_DEFINED",
              "modifiedAttackVector": "NOT_DEFINED",
              "modifiedPrivilegesRequired": "NOT_DEFINED",
              "modifiedSubAvailabilityImpact": "NOT_DEFINED",
              "modifiedSubConfidentialityImpact": "NOT_DEFINED",
              "modifiedSubIntegrityImpact": "NOT_DEFINED",
              "modifiedUserInteraction": "NOT_DEFINED",
              "modifiedVulnAvailabilityImpact": "NOT_DEFINED",
              "modifiedVulnConfidentialityImpact": "NOT_DEFINED",
              "modifiedVulnIntegrityImpact": "NOT_DEFINED",
              "privilegesRequired": "NONE",
              "providerUrgency": "NOT_DEFINED",
              "subAvailabilityImpact": "NONE",
              "subConfidentialityImpact": "NONE",
              "subIntegrityImpact": "NONE",
              "userInteraction": "NONE",
              "valueDensity": "NOT_DEFINED",
              "vectorString": "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/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X",
              "version": "4.0",
              "vulnAvailabilityImpact": "HIGH",
              "vulnConfidentialityImpact": "NONE",
              "vulnIntegrityImpact": "NONE",
              "vulnerabilityResponseEffort": "NOT_DEFINED"
            },
            "source": "security-advisories@github.com",
            "type": "Secondary"
          }
        ],
        "ssvcV203": [
          {
            "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
            "ssvcData": {
              "id": "CVE-2026-25541",
              "options": [
                {
                  "exploitation": "poc"
                },
                {
                  "automatable": "no"
                },
                {
                  "technicalImpact": "partial"
                }
              ],
              "role": "CISA Coordinator",
              "timestamp": "2026-02-05T15:13:12.910010Z",
              "version": "2.0.3"
            }
          }
        ]
      },
      "published": "2026-02-04T22:16:00.383",
      "references": [
        {
          "source": "security-advisories@github.com",
          "tags": [
            "Patch"
          ],
          "url": "https://github.com/tokio-rs/bytes/commit/d0293b0e35838123c51ca5dfdf468ecafee4398f"
        },
        {
          "source": "security-advisories@github.com",
          "tags": [
            "Product",
            "Release Notes"
          ],
          "url": "https://github.com/tokio-rs/bytes/releases/tag/v1.11.1"
        },
        {
          "source": "security-advisories@github.com",
          "tags": [
            "Exploit",
            "Vendor Advisory"
          ],
          "url": "https://github.com/tokio-rs/bytes/security/advisories/GHSA-434x-w66g-qw3r"
        },
        {
          "source": "security-advisories@github.com",
          "tags": [
            "Exploit",
            "Third Party Advisory"
          ],
          "url": "https://rustsec.org/advisories/RUSTSEC-2026-0007.html"
        }
      ],
      "sourceIdentifier": "security-advisories@github.com",
      "vulnStatus": "Analyzed",
      "weaknesses": [
        {
          "description": [
            {
              "lang": "en",
              "value": "CWE-680"
            }
          ],
          "source": "security-advisories@github.com",
          "type": "Secondary"
        }
      ]
    }

    CVE-2026-25541 (GCVE-0-2026-25541)

    Vulnerability from nvd – Published: 2026-02-04 22:03 – Updated: 2026-02-05 15:13
    VLAI
    Title
    Bytes is vulnerable to integer overflow in BytesMut::reserve
    Summary
    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.
    SSVC
    Exploitation: poc Automatable: no Technical Impact: partial
    CISA Coordinator · CISA-ADP (v2.0.3)
    Decision recorded 2026-02-05 15:13 UTC
    CWE
    • CWE-680 - Integer Overflow to Buffer Overflow
    Assigner
    GitHub_M CNA under the mitre root
    CNA scorecard C 72/100 over 7982 records in the last 180 days details
    Impacted products
    Vendor Product Version
    tokio-rs bytes Affected: >= 1.2.1, < 1.11.1
    Create a notification for this product.
    Show details on NVD website

    {
      "containers": {
        "adp": [
          {
            "metrics": [
              {
                "other": {
                  "content": {
                    "id": "CVE-2026-25541",
                    "options": [
                      {
                        "Exploitation": "poc"
                      },
                      {
                        "Automatable": "no"
                      },
                      {
                        "Technical Impact": "partial"
                      }
                    ],
                    "role": "CISA Coordinator",
                    "timestamp": "2026-02-05T15:13:12.910010Z",
                    "version": "2.0.3"
                  },
                  "type": "ssvc"
                }
              }
            ],
            "providerMetadata": {
              "dateUpdated": "2026-02-05T15:13:34.031Z",
              "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
              "shortName": "CISA-ADP"
            },
            "title": "CISA ADP Vulnrichment"
          }
        ],
        "cna": {
          "affected": [
            {
              "product": "bytes",
              "vendor": "tokio-rs",
              "versions": [
                {
                  "status": "affected",
                  "version": "\u003e= 1.2.1, \u003c 1.11.1"
                }
              ]
            }
          ],
          "descriptions": [
            {
              "lang": "en",
              "value": "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 \u003e= 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."
            }
          ],
          "metrics": [
            {
              "cvssV4_0": {
                "attackComplexity": "LOW",
                "attackRequirements": "NONE",
                "attackVector": "LOCAL",
                "baseScore": 5.5,
                "baseSeverity": "MEDIUM",
                "privilegesRequired": "NONE",
                "subAvailabilityImpact": "NONE",
                "subConfidentialityImpact": "NONE",
                "subIntegrityImpact": "NONE",
                "userInteraction": "NONE",
                "vectorString": "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",
                "version": "4.0",
                "vulnAvailabilityImpact": "HIGH",
                "vulnConfidentialityImpact": "NONE",
                "vulnIntegrityImpact": "NONE"
              }
            }
          ],
          "problemTypes": [
            {
              "descriptions": [
                {
                  "cweId": "CWE-680",
                  "description": "CWE-680: Integer Overflow to Buffer Overflow",
                  "lang": "en",
                  "type": "CWE"
                }
              ]
            }
          ],
          "providerMetadata": {
            "dateUpdated": "2026-02-04T22:03:53.554Z",
            "orgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
            "shortName": "GitHub_M"
          },
          "references": [
            {
              "name": "https://github.com/tokio-rs/bytes/security/advisories/GHSA-434x-w66g-qw3r",
              "tags": [
                "x_refsource_CONFIRM"
              ],
              "url": "https://github.com/tokio-rs/bytes/security/advisories/GHSA-434x-w66g-qw3r"
            },
            {
              "name": "https://github.com/tokio-rs/bytes/commit/d0293b0e35838123c51ca5dfdf468ecafee4398f",
              "tags": [
                "x_refsource_MISC"
              ],
              "url": "https://github.com/tokio-rs/bytes/commit/d0293b0e35838123c51ca5dfdf468ecafee4398f"
            },
            {
              "name": "https://github.com/tokio-rs/bytes/releases/tag/v1.11.1",
              "tags": [
                "x_refsource_MISC"
              ],
              "url": "https://github.com/tokio-rs/bytes/releases/tag/v1.11.1"
            },
            {
              "name": "https://rustsec.org/advisories/RUSTSEC-2026-0007.html",
              "tags": [
                "x_refsource_MISC"
              ],
              "url": "https://rustsec.org/advisories/RUSTSEC-2026-0007.html"
            }
          ],
          "source": {
            "advisory": "GHSA-434x-w66g-qw3r",
            "discovery": "UNKNOWN"
          },
          "title": "Bytes is vulnerable to integer overflow in BytesMut::reserve"
        }
      },
      "cveMetadata": {
        "assignerOrgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
        "assignerShortName": "GitHub_M",
        "cveId": "CVE-2026-25541",
        "datePublished": "2026-02-04T22:03:53.554Z",
        "dateReserved": "2026-02-02T19:59:47.375Z",
        "dateUpdated": "2026-02-05T15:13:34.031Z",
        "state": "PUBLISHED"
      },
      "dataType": "CVE_RECORD",
      "dataVersion": "5.2"
    }

    CVE-2026-25541 (GCVE-0-2026-25541)

    Vulnerability from cvelistv5 – Published: 2026-02-04 22:03 – Updated: 2026-02-05 15:13
    VLAI
    Title
    Bytes is vulnerable to integer overflow in BytesMut::reserve
    Summary
    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.
    SSVC
    Exploitation: poc Automatable: no Technical Impact: partial
    CISA Coordinator · CISA-ADP (v2.0.3)
    Decision recorded 2026-02-05 15:13 UTC
    CWE
    • CWE-680 - Integer Overflow to Buffer Overflow
    Assigner
    GitHub_M CNA under the mitre root
    CNA scorecard C 72/100 over 7982 records in the last 180 days details
    Impacted products
    Vendor Product Version
    tokio-rs bytes Affected: >= 1.2.1, < 1.11.1
    Create a notification for this product.
    Show details on NVD website

    {
      "containers": {
        "adp": [
          {
            "metrics": [
              {
                "other": {
                  "content": {
                    "id": "CVE-2026-25541",
                    "options": [
                      {
                        "Exploitation": "poc"
                      },
                      {
                        "Automatable": "no"
                      },
                      {
                        "Technical Impact": "partial"
                      }
                    ],
                    "role": "CISA Coordinator",
                    "timestamp": "2026-02-05T15:13:12.910010Z",
                    "version": "2.0.3"
                  },
                  "type": "ssvc"
                }
              }
            ],
            "providerMetadata": {
              "dateUpdated": "2026-02-05T15:13:34.031Z",
              "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
              "shortName": "CISA-ADP"
            },
            "title": "CISA ADP Vulnrichment"
          }
        ],
        "cna": {
          "affected": [
            {
              "product": "bytes",
              "vendor": "tokio-rs",
              "versions": [
                {
                  "status": "affected",
                  "version": "\u003e= 1.2.1, \u003c 1.11.1"
                }
              ]
            }
          ],
          "descriptions": [
            {
              "lang": "en",
              "value": "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 \u003e= 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."
            }
          ],
          "metrics": [
            {
              "cvssV4_0": {
                "attackComplexity": "LOW",
                "attackRequirements": "NONE",
                "attackVector": "LOCAL",
                "baseScore": 5.5,
                "baseSeverity": "MEDIUM",
                "privilegesRequired": "NONE",
                "subAvailabilityImpact": "NONE",
                "subConfidentialityImpact": "NONE",
                "subIntegrityImpact": "NONE",
                "userInteraction": "NONE",
                "vectorString": "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",
                "version": "4.0",
                "vulnAvailabilityImpact": "HIGH",
                "vulnConfidentialityImpact": "NONE",
                "vulnIntegrityImpact": "NONE"
              }
            }
          ],
          "problemTypes": [
            {
              "descriptions": [
                {
                  "cweId": "CWE-680",
                  "description": "CWE-680: Integer Overflow to Buffer Overflow",
                  "lang": "en",
                  "type": "CWE"
                }
              ]
            }
          ],
          "providerMetadata": {
            "dateUpdated": "2026-02-04T22:03:53.554Z",
            "orgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
            "shortName": "GitHub_M"
          },
          "references": [
            {
              "name": "https://github.com/tokio-rs/bytes/security/advisories/GHSA-434x-w66g-qw3r",
              "tags": [
                "x_refsource_CONFIRM"
              ],
              "url": "https://github.com/tokio-rs/bytes/security/advisories/GHSA-434x-w66g-qw3r"
            },
            {
              "name": "https://github.com/tokio-rs/bytes/commit/d0293b0e35838123c51ca5dfdf468ecafee4398f",
              "tags": [
                "x_refsource_MISC"
              ],
              "url": "https://github.com/tokio-rs/bytes/commit/d0293b0e35838123c51ca5dfdf468ecafee4398f"
            },
            {
              "name": "https://github.com/tokio-rs/bytes/releases/tag/v1.11.1",
              "tags": [
                "x_refsource_MISC"
              ],
              "url": "https://github.com/tokio-rs/bytes/releases/tag/v1.11.1"
            },
            {
              "name": "https://rustsec.org/advisories/RUSTSEC-2026-0007.html",
              "tags": [
                "x_refsource_MISC"
              ],
              "url": "https://rustsec.org/advisories/RUSTSEC-2026-0007.html"
            }
          ],
          "source": {
            "advisory": "GHSA-434x-w66g-qw3r",
            "discovery": "UNKNOWN"
          },
          "title": "Bytes is vulnerable to integer overflow in BytesMut::reserve"
        }
      },
      "cveMetadata": {
        "assignerOrgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
        "assignerShortName": "GitHub_M",
        "cveId": "CVE-2026-25541",
        "datePublished": "2026-02-04T22:03:53.554Z",
        "dateReserved": "2026-02-02T19:59:47.375Z",
        "dateUpdated": "2026-02-05T15:13:34.031Z",
        "state": "PUBLISHED"
      },
      "dataType": "CVE_RECORD",
      "dataVersion": "5.2"
    }