GHSA-vfvv-c25p-m7mm: rkyv Panic Safety Bugs Vulnerability
MODERATEGHSA-vfvv-c25p-m7mm is a MODERATE panic safety bugs vulnerability (CWE-415: Double Free) affecting rkyv libraries in the crates.io ecosystem. The issue involves panic safety bugs in `inlinevec::clear` and `servec::clear` enable arbitrary code execution. Remediation is available by upgrading affected packages to version 0.8.16.
GHSA-vfvv-c25p-m7mm at a Glance
How to Fix GHSA-vfvv-c25p-m7mm
To remediate this vulnerability, upgrade all affected rkyv dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade rkyv to 0.8.16
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for rkyv
How to Check if You Are Affected
To determine whether your application is affected by GHSA-vfvv-c25p-m7mm, inspect your project dependencies for rkyv:
inspect dependencies for rkyv
Analyze the terminal output to locate any version of rkyv in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.8.16), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-415: Double Free, where the product calls free() twice on the same memory address. In rkyv, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-vfvv-c25p-m7mm Affected rkyv Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
rkyv
|
crates.io |
≥ 0.8.0
< 0.8.16
|
0.8.16
|
References
Frequently Asked Questions
What is GHSA-vfvv-c25p-m7mm?
Which rkyv versions are affected?
What version fixes GHSA-vfvv-c25p-m7mm?
Is rkyv affected?
What CWE is associated with GHSA-vfvv-c25p-m7mm?
How can I check crates.io dependencies for GHSA-vfvv-c25p-m7mm?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-vfvv-c25p-m7mm",
"modified" : "2026-05-15T18:09:10Z",
"published" : "2026-05-15T18:09:10Z",
"aliases" : [ ],
"summary" : "rkyv: Panic safety bugs in `InlineVec::clear` and `SerVec::clear` enable arbitrary code execution",
"details" : "`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.\n\nA subsequent invocation of `clear()` on the same container then re-visits the already-freed elements:\n\n- `InlineVec::clear()` is called again from `InlineVec`'s own `Drop` implementation when the value is later dropped.\n- `SerVec::clear()` is called again by `SerVec::with_capacity()` after the user closure returns.\n\n\n## Technical Impact\n\n- **CWE-415 (Double Free):** Heap corruption when element type holds `Box<T>` \n- **CWE-416 (Use-After-Free):** Memory corruption when element reads from heap during `Drop`\n\nBoth vulnerabilities are triggerable entirely from safe Rust via `std::panic::catch_unwind` and require no special privileges.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "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"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "rkyv"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.8.0"
}, {
"fixed" : "0.8.16"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/rkyv/rkyv/commit/5828cf5c27b664eb4432c4a93d4769e12e5e42fb"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/rkyv/rkyv"
}, {
"type" : "WEB",
"url" : "https://rustsec.org/advisories/RUSTSEC-2026-0122.html"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-415", "CWE-416" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-05-15T18:09:10Z",
"nvd_published_at" : null
}
}