Skip to content

← Actionable
Medium, CVSS 6.9

rkyv: Panic safety bugs in InlineVec::clear and SerVec::clear enable arbitrary code execution

GHSA-vfvv-c25p-m7mm

What to do

Vendor fix available. Upgrade each affected package to the fixed version on its release line (rkyv 0.8.16), redeploy, then verify what is actually installed.

This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.

Affected packages

  • crates.io rkyv

    Affected
    >= 0.8.0, < 0.8.16
    Fixed in
    0.8.16

Sources

Severity and exploitation
Exploitation
No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
CVSS 4.0
6.9 · CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N · score source
EPSS
No dated EPSS signal available.
Source description

As published by the source; long descriptions are shortened.

InlineVec::clear() and SerVec::clear() in rkyv were not panic-safe. Both functions iterate over their elements and call dropinplace 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::withcapacity() after the user closure returns. Technical Impact - CWE-415 (Double Free): Heap corruption when element type holds Box<T - CWE-416 (Use-After-Free): Memory corruption when element reads from heap during Drop Both vulnerabilities are triggerable entirely from safe Rust via std::panic::catchunwind and require no special privileges.

Dates and revisions
Published by the source
Last modified by the source
Source last checked
  1. Revision 1 · created ·

    Published from ghsa record GHSA-vfvv-c25p-m7mm

Agent brief

Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.

# Patch Next advisory brief: GHSA-vfvv-c25p-m7mm

Advisory: rkyv: Panic safety bugs in `InlineVec::clear` and `SerVec::clear` enable arbitrary code execution
IDs: GHSA-vfvv-c25p-m7mm
Record: https://patchnext.com/advisories/ghsa-vfvv-c25p-m7mm (revision 1, source checked 26 Oct 2026, 15:42 UTC)
Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected.
Severity: Medium (CVSS 6.9)
Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV.
Vendor response: Vendor fix available; fixed versions by package: rkyv 0.8.16. A vendor fix does not mean a deployment is fixed.

## Affected components
- crates.io rkyv: affected >= 0.8.0, < 0.8.16; fixed in 0.8.16

## Suggested inspection (read-only)
- crates.io rkyv: check the installed version with your package manager.

## Supported action
Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version.

## Required regression checks
- Run the test suite and a production build.
- Exercise the features that depend on rkyv.
- Repeat the inspection and confirm that only fixed versions remain installed.

## Rollback considerations
- Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward.

## Unresolved questions
- Which deployments run an affected version?
- Exploitation status can change. Check again before lowering the priority.
- Mark the work resolved only after the fixed version is verified in production.

## Sources
- Verified: https://github.com/advisories/GHSA-vfvv-c25p-m7mm (GitHub-reviewed advisory GHSA-vfvv-c25p-m7mm lists affected ranges: crates.io rkyv >=0.8.0 <0.8.16)

Commands are suggestions: review each one before running it.

Loading voting…