Advisory Database
  • Advisories
  • Dependency Scanning
  1. cargo
  2. ›
  3. rkyv
  4. ›
  5. GHSA-vfvv-c25p-m7mm

GHSA-vfvv-c25p-m7mm: rkyv: Panic safety bugs in `InlineVec::clear` and `SerVec::clear` enable arbitrary code execution

May 15, 2026

InlineVec::clear() and SerVec::clear() in rkyv were not panic-safe. Both functions iterate over their elements and call drop_in_place on each, updating self.len only after the loop. If an element’s Drop implementation panics during the loop, self.len is left at its original value.

A subsequent invocation of clear() on the same container then re-visits the already-freed elements:

  • InlineVec::clear() is called again from InlineVec’s own Drop implementation when the value is later dropped.
  • SerVec::clear() is called again by SerVec::with_capacity() after the user closure returns.

References

  • github.com/advisories/GHSA-vfvv-c25p-m7mm
  • github.com/rkyv/rkyv/commit/5828cf5c27b664eb4432c4a93d4769e12e5e42fb
  • rustsec.org/advisories/RUSTSEC-2026-0122.html

Code Behaviors & Features

Detect and mitigate GHSA-vfvv-c25p-m7mm with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions starting from 0.8.0 before 0.8.16

Fixed versions

  • 0.8.16

Solution

Upgrade to version 0.8.16 or above.

Impact 6.5 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L

Learn more about CVSS

Weakness

  • CWE-415: Double Free
  • CWE-416: Use After Free

Source file

cargo/rkyv/GHSA-vfvv-c25p-m7mm.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:15:47 +0000.